From ba374a27db88a3fe342efb404e513313aab478cb Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 23 Oct 2023 22:26:55 +0200 Subject: [PATCH] Reduce code bloat --- Source/Engine/Core/Delegate.h | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/Source/Engine/Core/Delegate.h b/Source/Engine/Core/Delegate.h index 4e081faef..821d7916e 100644 --- a/Source/Engine/Core/Delegate.h +++ b/Source/Engine/Core/Delegate.h @@ -583,18 +583,9 @@ public: template void Unbind() { -#if DELEGATE_USE_ATOMIC FunctionType f; f.template Bind(); Unbind(f); -#else - if (_functions == nullptr) - return; - FunctionType f; - f.template Bind(); - ScopeLock lock(*_locker); - _functions->Remove(f); -#endif } /// @@ -604,18 +595,9 @@ public: template void Unbind(T* callee) { -#if DELEGATE_USE_ATOMIC FunctionType f; f.template Bind(callee); Unbind(f); -#else - if (_functions == nullptr) - return; - FunctionType f; - f.template Bind(callee); - ScopeLock lock(*_locker); - _functions->Remove(f); -#endif } /// @@ -624,16 +606,8 @@ public: /// The method. void Unbind(Signature method) { -#if DELEGATE_USE_ATOMIC FunctionType f(method); Unbind(f); -#else - if (_functions == nullptr) - return; - FunctionType f(method); - ScopeLock lock(*_locker); - _functions->Remove(f); -#endif } ///