From f574b9d9624eb5f41c10dedbdfe9ac685bdf5297 Mon Sep 17 00:00:00 2001 From: hogliux Date: Fri, 25 May 2018 08:53:48 +0100 Subject: [PATCH] VS2013: Fixed a VS2013 compiler error in the AudioPluginHost --- extras/AudioPluginHost/Source/UI/MainHostWindow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp index 9abd73a38c..e395667492 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp @@ -81,8 +81,9 @@ MainHostWindow::MainHostWindow() formatManager.addDefaultFormats(); formatManager.addFormat (new InternalPluginFormat()); + auto safeThis = SafePointer (this); RuntimePermissions::request (RuntimePermissions::recordAudio, - [safeThis = SafePointer (this)] (bool granted) mutable + [safeThis] (bool granted) mutable { std::unique_ptr savedAudioState (getAppProperties().getUserSettings() ->getXmlValue ("audioDeviceState")); @@ -573,9 +574,11 @@ void MainHostWindow::showAudioSettings() o.resizable = false; auto* w = o.create(); + auto safeThis = SafePointer (this); + w->enterModalState (true, ModalCallbackFunction::create - ([safeThis = SafePointer (this)] (int) + ([safeThis] (int) { std::unique_ptr audioState (safeThis->deviceManager.createStateXml());