use C++11 for VST3 SDK (revert custom cxx98 patch)
This commit is contained in:
@@ -102,7 +102,7 @@ private:
|
||||
guint _source_id;
|
||||
};
|
||||
|
||||
std::unordered_map<FileDescriptor, EventHandler> _event_handlers;
|
||||
std::unordered_map<Linux::FileDescriptor, EventHandler> _event_handlers;
|
||||
std::unordered_map<guint, Linux::ITimerHandler*> _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<FileDescriptor, EventHandler>::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<FileDescriptor, EventHandler>::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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user