Browse Source

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
pull/179/head
JP Cimalando Filipe Coelho <falktx@gmail.com> 5 years ago
parent
commit
945ee9a2f4
2 changed files with 8 additions and 1 deletions
  1. +2
    -0
      distrho/DistrhoPlugin.hpp
  2. +6
    -1
      distrho/src/DistrhoDefines.h

+ 2
- 0
distrho/DistrhoPlugin.hpp View File

@@ -365,6 +365,8 @@ struct ParameterEnumerationValues {
values = nullptr;
}
}

DISTRHO_DECLARE_NON_COPY_STRUCT(ParameterEnumerationValues)
};

/**


+ 6
- 1
distrho/src/DistrhoDefines.h View File

@@ -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 */


Loading…
Cancel
Save