diff --git a/distrho/DistrhoUtils.hpp b/distrho/DistrhoUtils.hpp index c842798a..bdd367a2 100644 --- a/distrho/DistrhoUtils.hpp +++ b/distrho/DistrhoUtils.hpp @@ -38,7 +38,7 @@ typedef SSIZE_T ssize_t; #endif -#if ! defined(CARLA_MATH_UTILS_HPP_INCLUDED) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT) +#if ! defined(CARLA_MATH_UTILS_HPP_INCLUDED) && ! defined(DISTRHO_PROPER_CPP11_SUPPORT) && ! defined(DISTRHO_OS_MAC) namespace std { inline float fmin(float __x, float __y) { return __builtin_fminf(__x, __y); } diff --git a/distrho/extra/WebViewImpl.cpp b/distrho/extra/WebViewImpl.cpp index fcca8fb4..b9edc238 100644 --- a/distrho/extra/WebViewImpl.cpp +++ b/distrho/extra/WebViewImpl.cpp @@ -313,10 +313,10 @@ struct WebViewData { #if WEB_VIEW_USING_CHOC choc::ui::WebView* const webview; #elif WEB_VIEW_USING_MACOS_WEBKIT - NSView* const view; - WKWebView* const webview; - NSURLRequest* const urlreq; - WEB_VIEW_DELEGATE_CLASS_NAME* const delegate; + NSView* view; + WKWebView* webview; + NSURLRequest* urlreq; + WEB_VIEW_DELEGATE_CLASS_NAME* delegate; #elif WEB_VIEW_USING_X11_IPC int shmfd = 0; char shmname[128] = {}; @@ -329,6 +329,8 @@ struct WebViewData { ::Window childWindow = 0; ::Window ourWindow = 0; #endif + WebViewData() {} + DISTRHO_DECLARE_NON_COPYABLE(WebViewData); }; // ----------------------------------------------------------------------------------------------------------- @@ -549,7 +551,12 @@ WebViewHandle webViewCreate(const uintptr_t windowId, [config release]; [prefs release]; - return new WebViewData{options.callback, view, webview, urlreq, delegate}; + WebViewData* const handle = new WebViewData; + handle->view = view; + handle->webview = webview; + handle->urlreq = urlreq; + handle->delegate = delegate; + return handle; #elif WEB_VIEW_USING_X11_IPC // get startup paths char ldlinux[PATH_MAX] = {}; @@ -759,7 +766,7 @@ void webViewEvaluateJS(const WebViewHandle handle, const char* const js) NSString* const nsjs = [[NSString alloc] initWithBytes:js length:std::strlen(js) encoding:NSUTF8StringEncoding]; - [handle->webview evaluateJavaScript:nsjs completionHandler:nullptr]; + [handle->webview evaluateJavaScript:nsjs completionHandler:nil]; [nsjs release]; #elif WEB_VIEW_USING_X11_IPC d_debug("evaluateJS '%s'", js); diff --git a/distrho/src/DistrhoPluginAU.cpp b/distrho/src/DistrhoPluginAU.cpp index fad29b37..0f5168b7 100644 --- a/distrho/src/DistrhoPluginAU.cpp +++ b/distrho/src/DistrhoPluginAU.cpp @@ -119,7 +119,8 @@ static const char* AudioUnitPropertyID2Str(const AudioUnitPropertyID prop) noexc PROP(kMusicDeviceProperty_DualSchedulingMode) #undef PROP // DPF specific properties - #define PROP(s) case d_cconst(#s): return #s; + #define PROPX(s) (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | (s[3] << 0) + #define PROP(s) case PROPX(#s): return #s; PROP(DPFi) PROP(DPFe) PROP(DPFp) @@ -129,6 +130,7 @@ static const char* AudioUnitPropertyID2Str(const AudioUnitPropertyID prop) noexc PROP(DPFs) PROP(DPFa) #undef PROP + #undef PROPX } return "[unknown]"; } diff --git a/distrho/src/DistrhoPluginLV2.cpp b/distrho/src/DistrhoPluginLV2.cpp index df7783ae..d2791951 100644 --- a/distrho/src/DistrhoPluginLV2.cpp +++ b/distrho/src/DistrhoPluginLV2.cpp @@ -590,7 +590,7 @@ public: const LV2_Atom* property = nullptr; const LV2_Atom* value = nullptr; - lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, nullptr); + lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, 0); if (property != nullptr && property->type == fURIDs.atomURID && value != nullptr && (value->type == fURIDs.atomPath || value->type == fURIDs.atomString)) @@ -1122,7 +1122,7 @@ public: const LV2_Atom* property = nullptr; const LV2_Atom* value = nullptr; - lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, nullptr); + lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, 0); DISTRHO_SAFE_ASSERT_RETURN(property != nullptr, LV2_WORKER_ERR_UNKNOWN); DISTRHO_SAFE_ASSERT_RETURN(property->type == fURIDs.atomURID, LV2_WORKER_ERR_UNKNOWN); DISTRHO_SAFE_ASSERT_RETURN(value != nullptr, LV2_WORKER_ERR_UNKNOWN); diff --git a/distrho/src/DistrhoPluginVST.hpp b/distrho/src/DistrhoPluginVST.hpp index 9164b410..fa7f7cd9 100644 --- a/distrho/src/DistrhoPluginVST.hpp +++ b/distrho/src/DistrhoPluginVST.hpp @@ -45,7 +45,7 @@ // -------------------------------------------------------------------------------------------------------------------- -#ifdef DISTRHO_PROPER_CPP11_SUPPORT +#if defined(DISTRHO_PROPER_CPP11_SUPPORT) || defined(DISTRHO_OS_MAC) # include #else // quick and dirty std::atomic replacement for the things we need diff --git a/distrho/src/jackbridge/NativeBridge.hpp b/distrho/src/jackbridge/NativeBridge.hpp index ac969544..33793e8d 100644 --- a/distrho/src/jackbridge/NativeBridge.hpp +++ b/distrho/src/jackbridge/NativeBridge.hpp @@ -49,10 +49,10 @@ struct NativeBridge { uint numMidiOuts; // JACK callbacks - JackProcessCallback jackProcessCallback = nullptr; - JackBufferSizeCallback bufferSizeCallback = nullptr; - void* jackProcessArg = nullptr; - void* jackBufferSizeArg = nullptr; + JackProcessCallback jackProcessCallback; + JackBufferSizeCallback bufferSizeCallback; + void* jackProcessArg; + void* jackBufferSizeArg; // Runtime buffers enum PortMask { diff --git a/examples/WebMeters/DistrhoPluginInfo.h b/examples/WebMeters/DistrhoPluginInfo.h index 89a5cfcf..cd6d395e 100644 --- a/examples/WebMeters/DistrhoPluginInfo.h +++ b/examples/WebMeters/DistrhoPluginInfo.h @@ -37,8 +37,8 @@ #define METER_COLOR_GREEN 0 #define METER_COLOR_BLUE 1 -#define DISTRHO_UI_DEFAULT_WIDTH 600 -#define DISTRHO_UI_DEFAULT_HEIGHT 400 +#define DISTRHO_UI_DEFAULT_WIDTH 100 +#define DISTRHO_UI_DEFAULT_HEIGHT 500 #define kVerticalOffset 0 #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/examples/WebMeters/ExampleUIWebMeters.cpp b/examples/WebMeters/ExampleUIWebMeters.cpp index 68daf206..421ab122 100644 --- a/examples/WebMeters/ExampleUIWebMeters.cpp +++ b/examples/WebMeters/ExampleUIWebMeters.cpp @@ -24,7 +24,7 @@ class ExampleUIMeters : public UI { public: ExampleUIMeters() - : UI(100, 500, false) + : UI() { }