diff --git a/libs/ardour/vst3_host.cc b/libs/ardour/vst3_host.cc index 7be431c64f..65ddacac81 100644 --- a/libs/ardour/vst3_host.cc +++ b/libs/ardour/vst3_host.cc @@ -102,7 +102,7 @@ private: guint _source_id; }; - std::unordered_map _event_handlers; + std::unordered_map _event_handlers; std::unordered_map _timer_handlers; static gboolean event (GIOChannel* source, GIOCondition condition, gpointer data) @@ -132,7 +132,7 @@ public: void clear () { Glib::Threads::Mutex::Lock lm (_lock); - for (std::unordered_map::const_iterator it = _event_handlers.begin (); it != _event_handlers.end (); ++it) { + for (auto it = _event_handlers.begin (); it != _event_handlers.end (); ++it) { g_source_remove (it->second._source_id); g_io_channel_unref (it->second._gio_channel); } @@ -144,7 +144,7 @@ public: } /* VST3 IRunLoop interface */ - tresult registerEventHandler (Linux::IEventHandler* handler, FileDescriptor fd) SMTG_OVERRIDE + tresult registerEventHandler (Linux::IEventHandler* handler, Linux::FileDescriptor fd) SMTG_OVERRIDE { if (!handler || _event_handlers.find(fd) != _event_handlers.end()) { return kInvalidArgument; @@ -165,7 +165,7 @@ public: tresult rv = false; Glib::Threads::Mutex::Lock lm (_lock); - for (std::unordered_map::const_iterator it = _event_handlers.begin (); it != _event_handlers.end ();) { + for (auto it = _event_handlers.begin (); it != _event_handlers.end ();) { if (it->second._handler == handler) { g_source_remove (it->second._source_id); g_io_channel_unref (it->second._gio_channel); @@ -178,7 +178,7 @@ public: return rv; } - tresult registerTimer (Linux::ITimerHandler* handler, TimerInterval milliseconds) SMTG_OVERRIDE + tresult registerTimer (Linux::ITimerHandler* handler, Linux::TimerInterval milliseconds) SMTG_OVERRIDE { if (!handler || milliseconds == 0) { return kInvalidArgument; diff --git a/libs/vst3/pluginterfaces/base/fplatform.h b/libs/vst3/pluginterfaces/base/fplatform.h index 40c0b0a75a..68d25fe338 100644 --- a/libs/vst3/pluginterfaces/base/fplatform.h +++ b/libs/vst3/pluginterfaces/base/fplatform.h @@ -115,8 +115,8 @@ #ifndef SMTG_CPP11 #error unsupported compiler #endif - #define SMTG_CPP11_STDLIBSUPPORT SMTG_CPP11 - #define SMTG_HAS_NOEXCEPT SMTG_CPP11 + #define SMTG_CPP11_STDLIBSUPPORT 1 + #define SMTG_HAS_NOEXCEPT 1 #endif //----------------------------------------------------------------------------- // Mac and iOS diff --git a/libs/vst3/pluginterfaces/base/ftypes.h b/libs/vst3/pluginterfaces/base/ftypes.h index 5f61e0ac81..feda6b0b9b 100644 --- a/libs/vst3/pluginterfaces/base/ftypes.h +++ b/libs/vst3/pluginterfaces/base/ftypes.h @@ -93,8 +93,6 @@ namespace Steinberg typedef char char8; #ifdef _NATIVE_WCHAR_T_DEFINED typedef __wchar_t char16; -#elif defined(__MINGW32__) - typedef wchar_t char16; #elif SMTG_CPP11 typedef char16_t char16; #else diff --git a/libs/vst3/pluginterfaces/gui/iplugview.h b/libs/vst3/pluginterfaces/gui/iplugview.h index 9d6ec9a0d4..32e1fcb3bd 100644 --- a/libs/vst3/pluginterfaces/gui/iplugview.h +++ b/libs/vst3/pluginterfaces/gui/iplugview.h @@ -213,8 +213,8 @@ DECLARE_CLASS_IID (IPlugFrame, 0x367FAF01, 0xAFA94693, 0x8D4DA2A0, 0xED0882A3) //------------------------------------------------------------------------ namespace Linux { -#define TimerInterval uint64 -#define FileDescriptor int +using TimerInterval = uint64; +using FileDescriptor = int; //------------------------------------------------------------------------ /** Linux event handler interface diff --git a/libs/vst3/pluginterfaces/vst/ivstnoteexpression.h b/libs/vst3/pluginterfaces/vst/ivstnoteexpression.h index 87f5feac91..dd04d14f6a 100644 --- a/libs/vst3/pluginterfaces/vst/ivstnoteexpression.h +++ b/libs/vst3/pluginterfaces/vst/ivstnoteexpression.h @@ -34,10 +34,7 @@ VST predefines some types like volume, pan, tuning by defining their ranges and Used by NoteExpressionEvent::typeId and NoteExpressionTypeID::typeId \see NoteExpressionTypeInfo */ -enum NoteExpressionTypeIDs -#if SMTG_CPP11 - : uint32 -#endif +enum NoteExpressionTypeIDs : uint32 { kVolumeTypeID = 0, ///< Volume, plain range [0 = -oo , 0.25 = 0dB, 0.5 = +6dB, 1 = +12dB]: plain = 20 * log (4 * norm) kPanTypeID, ///< Panning (L-R), plain range [0 = left, 0.5 = center, 1 = right] @@ -186,10 +183,7 @@ DECLARE_CLASS_IID (INoteExpressionController, 0xB7F8F859, 0x41234872, 0x91169581 /** KeyswitchTypeIDs describes the type of a key switch \see KeyswitchInfo */ -enum KeyswitchTypeIDs -#if SMTG_CPP11 -: uint32 -#endif +enum KeyswitchTypeIDs : uint32 { kNoteOnKeyswitchTypeID = 0, ///< press before noteOn is played kOnTheFlyKeyswitchTypeID, ///< press while noteOn is played