From e36aaaa02f896827143687629647a9e4a2f8780b Mon Sep 17 00:00:00 2001 From: falkTX Date: Sat, 22 May 2021 12:44:41 +0100 Subject: [PATCH] Use DISTRHO_DECLARE_NON_COPYABLE Signed-off-by: falkTX --- dgl/src/Common.hpp | 4 ++-- dgl/src/ImageBaseWidgets.cpp | 6 +++--- distrho/DistrhoPlugin.hpp | 2 +- distrho/extra/ExternalWindow.hpp | 2 +- distrho/extra/LeakDetector.hpp | 4 ++-- distrho/extra/Mutex.hpp | 12 ++++++------ distrho/extra/Thread.hpp | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dgl/src/Common.hpp b/dgl/src/Common.hpp index ebb599a7..b55a62ac 100644 --- a/dgl/src/Common.hpp +++ b/dgl/src/Common.hpp @@ -115,7 +115,7 @@ struct ButtonImpl { } DISTRHO_PREVENT_HEAP_ALLOCATION - DISTRHO_DECLARE_NON_COPY_STRUCT(ButtonImpl) + DISTRHO_DECLARE_NON_COPYABLE(ButtonImpl) }; // ----------------------------------------------------------------------- @@ -178,7 +178,7 @@ struct ImageBaseKnob::PrivateData { return std::log(value/a)/b; } - DISTRHO_DECLARE_NON_COPY_STRUCT(PrivateData) + DISTRHO_DECLARE_NON_COPYABLE(PrivateData) }; // ----------------------------------------------------------------------- diff --git a/dgl/src/ImageBaseWidgets.cpp b/dgl/src/ImageBaseWidgets.cpp index 236c0ab5..fcf04b1c 100644 --- a/dgl/src/ImageBaseWidgets.cpp +++ b/dgl/src/ImageBaseWidgets.cpp @@ -109,7 +109,7 @@ struct ImageBaseButton::PrivateData { imageHover(hover), imageDown(down) {} - DISTRHO_DECLARE_NON_COPY_STRUCT(PrivateData) + DISTRHO_DECLARE_NON_COPYABLE(PrivateData) }; // -------------------------------------------------------------------------------------------------------------------- @@ -617,7 +617,7 @@ struct ImageBaseSlider::PrivateData { } } - DISTRHO_DECLARE_NON_COPY_STRUCT(PrivateData) + DISTRHO_DECLARE_NON_COPYABLE(PrivateData) }; // -------------------------------------------------------------------------------------------------------------------- @@ -976,7 +976,7 @@ struct ImageBaseSwitch::PrivateData { DISTRHO_SAFE_ASSERT(imageNormal.getSize() == imageDown.getSize()); } - DISTRHO_DECLARE_NON_COPY_STRUCT(PrivateData) + DISTRHO_DECLARE_NON_COPYABLE(PrivateData) }; // -------------------------------------------------------------------------------------------------------------------- diff --git a/distrho/DistrhoPlugin.hpp b/distrho/DistrhoPlugin.hpp index 9e55c87f..83315665 100644 --- a/distrho/DistrhoPlugin.hpp +++ b/distrho/DistrhoPlugin.hpp @@ -369,7 +369,7 @@ struct ParameterEnumerationValues { } } - DISTRHO_DECLARE_NON_COPY_STRUCT(ParameterEnumerationValues) + DISTRHO_DECLARE_NON_COPYABLE(ParameterEnumerationValues) }; /** diff --git a/distrho/extra/ExternalWindow.hpp b/distrho/extra/ExternalWindow.hpp index c39f55c7..68c35c41 100644 --- a/distrho/extra/ExternalWindow.hpp +++ b/distrho/extra/ExternalWindow.hpp @@ -192,7 +192,7 @@ private: friend class UIExporter; - DISTRHO_DECLARE_NON_COPY_CLASS(ExternalWindow) + DISTRHO_DECLARE_NON_COPYABLE(ExternalWindow) }; // ----------------------------------------------------------------------- diff --git a/distrho/extra/LeakDetector.hpp b/distrho/extra/LeakDetector.hpp index b146efc7..765e4676 100644 --- a/distrho/extra/LeakDetector.hpp +++ b/distrho/extra/LeakDetector.hpp @@ -54,13 +54,13 @@ START_NAMESPACE_DISTRHO DISTRHO_NAMESPACE::LeakedObjectDetector DISTRHO_JOIN_MACRO(leakDetector_, ClassName); # define DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \ - DISTRHO_DECLARE_NON_COPY_CLASS(ClassName) \ + DISTRHO_DECLARE_NON_COPYABLE(ClassName) \ DISTRHO_LEAK_DETECTOR(ClassName) #else /** Don't use leak detection on release builds. */ # define DISTRHO_LEAK_DETECTOR(ClassName) # define DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \ - DISTRHO_DECLARE_NON_COPY_CLASS(ClassName) + DISTRHO_DECLARE_NON_COPYABLE(ClassName) #endif //============================================================================== diff --git a/distrho/extra/Mutex.hpp b/distrho/extra/Mutex.hpp index 90332c30..9843bfcb 100644 --- a/distrho/extra/Mutex.hpp +++ b/distrho/extra/Mutex.hpp @@ -86,7 +86,7 @@ public: private: mutable pthread_mutex_t fMutex; - DISTRHO_DECLARE_NON_COPY_CLASS(Mutex) + DISTRHO_DECLARE_NON_COPYABLE(Mutex) }; // ----------------------------------------------------------------------- @@ -174,7 +174,7 @@ private: mutable pthread_mutex_t fMutex; #endif - DISTRHO_DECLARE_NON_COPY_CLASS(RecursiveMutex) + DISTRHO_DECLARE_NON_COPYABLE(RecursiveMutex) }; // ----------------------------------------------------------------------- @@ -255,7 +255,7 @@ private: volatile bool fTriggered; DISTRHO_PREVENT_HEAP_ALLOCATION - DISTRHO_DECLARE_NON_COPY_CLASS(Signal) + DISTRHO_DECLARE_NON_COPYABLE(Signal) }; // ----------------------------------------------------------------------- @@ -280,7 +280,7 @@ private: const Mutex& fMutex; DISTRHO_PREVENT_HEAP_ALLOCATION - DISTRHO_DECLARE_NON_COPY_CLASS(ScopeLocker) + DISTRHO_DECLARE_NON_COPYABLE(ScopeLocker) }; // ----------------------------------------------------------------------- @@ -319,7 +319,7 @@ private: const bool fLocked; DISTRHO_PREVENT_HEAP_ALLOCATION - DISTRHO_DECLARE_NON_COPY_CLASS(ScopeTryLocker) + DISTRHO_DECLARE_NON_COPYABLE(ScopeTryLocker) }; // ----------------------------------------------------------------------- @@ -344,7 +344,7 @@ private: const Mutex& fMutex; DISTRHO_PREVENT_HEAP_ALLOCATION - DISTRHO_DECLARE_NON_COPY_CLASS(ScopeUnlocker) + DISTRHO_DECLARE_NON_COPYABLE(ScopeUnlocker) }; // ----------------------------------------------------------------------- diff --git a/distrho/extra/Thread.hpp b/distrho/extra/Thread.hpp index 5a4ecffa..ec6f13d9 100644 --- a/distrho/extra/Thread.hpp +++ b/distrho/extra/Thread.hpp @@ -324,7 +324,7 @@ private: return nullptr; } - DISTRHO_DECLARE_NON_COPY_CLASS(Thread) + DISTRHO_DECLARE_NON_COPYABLE(Thread) }; // -----------------------------------------------------------------------