From 945ee9a2f4819ab75ec2f9b5a304c80e061d7f5d Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Sun, 18 Aug 2019 15:05:38 +0200 Subject: [PATCH] Suppress the copy methods of ParameterEnumerationValues (fixes #177) (#178) * Suppress the copy methods of ParameterEnumerationValues * Provide a C++98 definition of DISTRHO_DECLARE_NON_COPY_STRUCT --- distrho/DistrhoPlugin.hpp | 2 ++ distrho/src/DistrhoDefines.h | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/distrho/DistrhoPlugin.hpp b/distrho/DistrhoPlugin.hpp index 913f7ddd..896db5c4 100644 --- a/distrho/DistrhoPlugin.hpp +++ b/distrho/DistrhoPlugin.hpp @@ -365,6 +365,8 @@ struct ParameterEnumerationValues { values = nullptr; } } + + DISTRHO_DECLARE_NON_COPY_STRUCT(ParameterEnumerationValues) }; /** diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h index 14492f6c..a2e5522c 100644 --- a/distrho/src/DistrhoDefines.h +++ b/distrho/src/DistrhoDefines.h @@ -128,7 +128,12 @@ private: \ StructName& operator=(StructName&) = delete; \ StructName& operator=(const StructName&) = delete; #else -# define DISTRHO_DECLARE_NON_COPY_STRUCT(StructName) +# define DISTRHO_DECLARE_NON_COPY_STRUCT(StructName) \ +private: \ + StructName(StructName&); \ + StructName(const StructName&); \ + StructName& operator=(StructName&); \ + StructName& operator=(const StructName&); #endif /* Define DISTRHO_PREVENT_HEAP_ALLOCATION */