commit 945ee9a2f4819ab75ec2f9b5a304c80e061d7f5d parent 20a464142a2cc27aa0b3b930b6416c950cf79c24 Author: JP Cimalando <jp-dev@inbox.ru> Date: Sun, 18 Aug 2019 15:05:11 +0200 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 Diffstat:
M | distrho/DistrhoPlugin.hpp | | | 2 | ++ |
M | distrho/src/DistrhoDefines.h | | | 7 | ++++++- |
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git 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 @@ -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 */