diff options
author | David Robillard <d@drobilla.net> | 2014-11-07 17:21:43 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-07 17:21:43 -0500 |
commit | bb12c750bba6d4ce9424a36e472c701e98ac89f6 (patch) | |
tree | 2ff81cca92e5e042c25396f076b5281b30ea93aa /libs/ardour/ardour/variant.h | |
parent | 4260d0ca0e476011e7f2f1df9bf30c4bc20e1434 (diff) |
Just rename problematic Variant::VOID type.
Diffstat (limited to 'libs/ardour/ardour/variant.h')
-rw-r--r-- | libs/ardour/ardour/variant.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/libs/ardour/ardour/variant.h b/libs/ardour/ardour/variant.h index 7eccab251f..8fd9c829f7 100644 --- a/libs/ardour/ardour/variant.h +++ b/libs/ardour/ardour/variant.h @@ -29,10 +29,6 @@ #include "ardour/libardour_visibility.h" #include "pbd/compose.h" -#ifdef PLATFORM_WINDOWS -#undef VOID -#endif - namespace ARDOUR { /** A value with dynamic type (tagged union). */ @@ -40,7 +36,7 @@ class LIBARDOUR_API Variant { public: enum Type { - VOID, ///< Nothing + NOTHING, ///< Nothing (void) BOOL, ///< Boolean DOUBLE, ///< C double (64-bit IEEE-754) FLOAT, ///< C float (32-bit IEEE-754) @@ -51,12 +47,12 @@ public: URI ///< URI string }; - explicit Variant() : _type(VOID) { _long = 0; } - explicit Variant(bool value) : _type(BOOL) { _bool = value; } - explicit Variant(double value) : _type(DOUBLE) { _double = value; } - explicit Variant(float value) : _type(FLOAT) { _float = value; } - explicit Variant(int32_t value) : _type(INT) { _int = value; } - explicit Variant(int64_t value) : _type(LONG) { _long = value; } + explicit Variant() : _type(NOTHING) { _long = 0; } + explicit Variant(bool value) : _type(BOOL) { _bool = value; } + explicit Variant(double value) : _type(DOUBLE) { _double = value; } + explicit Variant(float value) : _type(FLOAT) { _float = value; } + explicit Variant(int32_t value) : _type(INT) { _int = value; } + explicit Variant(int64_t value) : _type(LONG) { _long = value; } /** Make a variant of a specific string type (string types only) */ Variant(Type type, const std::string& value) @@ -66,7 +62,7 @@ public: /** Make a numeric variant from a double (numeric types only). * - * If conversion is impossible, the variant will have type VOID. + * If conversion is impossible, the variant will have type NOTHING. */ Variant(Type type, double value) : _type(type) @@ -90,7 +86,7 @@ public: std::min(value, (double)INT64_MAX))); break; default: - _type = VOID; + _type = NOTHING; _long = 0; } } |