summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJP Cimalando <jp-dev@inbox.ru>2019-08-18 15:05:38 +0200
committerFilipe Coelho <falktx@gmail.com>2019-08-18 14:05:38 +0100
commit945ee9a2f4819ab75ec2f9b5a304c80e061d7f5d (patch)
treef13c209f9df9d116092aca71d441a7a800a5865b
parent20a464142a2cc27aa0b3b930b6416c950cf79c24 (diff)
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
-rw-r--r--distrho/DistrhoPlugin.hpp2
-rw-r--r--distrho/src/DistrhoDefines.h7
2 files changed, 8 insertions, 1 deletions
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 */