commit 4f65386ced127f6ead21eb580c20cd01d7183249
parent 784309eba858176d006182566bed4bc91eb7a069
Author: falkTX <falktx@falktx.com>
Date: Wed, 12 Apr 2023 19:53:20 +0200
Allow access to ParameterEnumerationValues::deleteLater
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/distrho/DistrhoDetails.hpp b/distrho/DistrhoDetails.hpp
@@ -517,7 +517,7 @@ struct ParameterEnumerationValues {
uint8_t count;
/**
- Wherever the host is to be restricted to only use enumeration values.
+ Whether the host is to be restricted to only use enumeration values.
@note This mode is only a hint! Not all hosts and plugin formats support this mode.
*/
@@ -526,11 +526,17 @@ struct ParameterEnumerationValues {
/**
Array of @ParameterEnumerationValue items.@n
When assining this pointer manually, it must be allocated on the heap with `new ParameterEnumerationValue[count]`.@n
- The array pointer will be automatically deleted later.
+ The array pointer will be automatically deleted later unless @p deleteLater is set to false.
*/
ParameterEnumerationValue* values;
/**
+ Whether to take ownership of the @p values pointer.@n
+ Defaults to true unless stated otherwise.
+ */
+ bool deleteLater;
+
+ /**
Default constructor, for zero enumeration values.
*/
constexpr ParameterEnumerationValues() noexcept
@@ -556,9 +562,6 @@ struct ParameterEnumerationValues {
if (deleteLater)
delete[] values;
}
-
-private:
- bool deleteLater;
};
/**