diff --git a/Makefile.plugins.mk b/Makefile.plugins.mk index cac8b517..d057e28c 100644 --- a/Makefile.plugins.mk +++ b/Makefile.plugins.mk @@ -75,8 +75,10 @@ ifeq ($(LINUX),true) VST3_FILENAME = $(TARGET_PROCESSOR)-linux/$(NAME).so endif ifeq ($(MACOS),true) +ifneq ($(MACOS_OLD),true) VST3_FILENAME = MacOS/$(NAME) endif +endif ifeq ($(WINDOWS),true) VST3_FILENAME = $(TARGET_PROCESSOR)-win/$(NAME).vst3 endif diff --git a/dgl/Widget.hpp b/dgl/Widget.hpp index 76610786..904e0057 100644 --- a/dgl/Widget.hpp +++ b/dgl/Widget.hpp @@ -150,7 +150,11 @@ public: : BaseEvent(), keycode(0), character(0), +#ifdef DISTRHO_PROPER_CPP11_SUPPORT string{'\0','\0','\0','\0','\0','\0','\0','\0'} {} +#else + string() { std::memset(string, 0, sizeof(string)); } +#endif }; /** diff --git a/dgl/src/pugl.hpp b/dgl/src/pugl.hpp index 15833809..9ad05dd6 100644 --- a/dgl/src/pugl.hpp +++ b/dgl/src/pugl.hpp @@ -20,9 +20,14 @@ #include "../Base.hpp" /* we will include all header files used in pugl in their C++ friendly form, then pugl stuff in custom namespace */ -#include #include -#include +#ifdef DISTRHO_PROPER_CPP11_SUPPORT +# include +# include +#else +# include +# include +#endif #define PUGL_API #define PUGL_DISABLE_DEPRECATED diff --git a/distrho/DistrhoUtils.hpp b/distrho/DistrhoUtils.hpp index d2c7cd5f..5d2a4cdc 100644 --- a/distrho/DistrhoUtils.hpp +++ b/distrho/DistrhoUtils.hpp @@ -38,7 +38,7 @@ typedef SSIZE_T ssize_t; #endif -#if defined(DISTRHO_OS_MAC) && ! defined(CARLA_OS_MAC) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT) +#if ! defined(CARLA_MATH_UTILS_HPP_INCLUDED) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT) namespace std { inline float fmin(float __x, float __y) { return __builtin_fminf(__x, __y); } diff --git a/distrho/src/DistrhoDefines.h b/distrho/src/DistrhoDefines.h index a9a316bb..f4a79a4e 100644 --- a/distrho/src/DistrhoDefines.h +++ b/distrho/src/DistrhoDefines.h @@ -64,6 +64,7 @@ #endif #ifndef DISTRHO_PROPER_CPP11_SUPPORT +# define constexpr # define noexcept throw() # define override # define final diff --git a/distrho/src/DistrhoPluginVST2.cpp b/distrho/src/DistrhoPluginVST2.cpp index cc5fc6ff..d73887a9 100644 --- a/distrho/src/DistrhoPluginVST2.cpp +++ b/distrho/src/DistrhoPluginVST2.cpp @@ -132,7 +132,7 @@ struct ParameterAndNotesHelper # endif #endif { -#ifndef DISTRHO_PROPER_CPP11_SUPPORT +#if DISTRHO_PLUGIN_HAS_UI && DISTRHO_PLUGIN_WANT_MIDI_INPUT && ! defined(DISTRHO_PROPER_CPP11_SUPPORT) std::memset(¬esRingBuffer, 0, sizeof(notesRingBuffer)); #endif } diff --git a/distrho/src/jackbridge/JackBridge.cpp b/distrho/src/jackbridge/JackBridge.cpp index 0ff70fe6..20f304b5 100644 --- a/distrho/src/jackbridge/JackBridge.cpp +++ b/distrho/src/jackbridge/JackBridge.cpp @@ -36,9 +36,11 @@ #include "../../extra/LibraryUtils.hpp" // in case JACK fails, we fallback to RtAudio's native API -#include "RtAudioBridge.hpp" -#ifdef RTAUDIO_API_TYPE -# include "rtaudio/RtAudio.cpp" +#ifdef DISTRHO_PROPER_CPP11_SUPPORT +# include "RtAudioBridge.hpp" +# ifdef RTAUDIO_API_TYPE +# include "rtaudio/RtAudio.cpp" +# endif #endif // ----------------------------------------------------------------------------- diff --git a/examples/FileHandling/NanoButton.cpp b/examples/FileHandling/NanoButton.cpp index 71e4ceb4..e5282a11 100644 --- a/examples/FileHandling/NanoButton.cpp +++ b/examples/FileHandling/NanoButton.cpp @@ -36,15 +36,15 @@ Button::Button(Widget *parent, Callback *cb) void Button::onNanoDisplay() { - auto w = getWidth(); - auto h = getHeight(); - auto margin = 1.0f; + const uint w = getWidth(); + const uint h = getHeight(); + const float margin = 1.0f; // Background beginPath(); fillColor(backgroundColor); strokeColor(borderColor); - rect(margin, margin, w - 2 * margin, h-2*margin); + rect(margin, margin, w - 2 * margin, h - 2 * margin); fill(); stroke(); closePath();