1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

VS2013: Fixed a VS2013 compiler error in the AudioPluginHost

This commit is contained in:
hogliux 2018-05-25 08:53:48 +01:00
parent f2824e96ef
commit f574b9d962

View file

@ -81,8 +81,9 @@ MainHostWindow::MainHostWindow()
formatManager.addDefaultFormats(); formatManager.addDefaultFormats();
formatManager.addFormat (new InternalPluginFormat()); formatManager.addFormat (new InternalPluginFormat());
auto safeThis = SafePointer<MainHostWindow> (this);
RuntimePermissions::request (RuntimePermissions::recordAudio, RuntimePermissions::request (RuntimePermissions::recordAudio,
[safeThis = SafePointer<MainHostWindow> (this)] (bool granted) mutable [safeThis] (bool granted) mutable
{ {
std::unique_ptr<XmlElement> savedAudioState (getAppProperties().getUserSettings() std::unique_ptr<XmlElement> savedAudioState (getAppProperties().getUserSettings()
->getXmlValue ("audioDeviceState")); ->getXmlValue ("audioDeviceState"));
@ -573,9 +574,11 @@ void MainHostWindow::showAudioSettings()
o.resizable = false; o.resizable = false;
auto* w = o.create(); auto* w = o.create();
auto safeThis = SafePointer<MainHostWindow> (this);
w->enterModalState (true, w->enterModalState (true,
ModalCallbackFunction::create ModalCallbackFunction::create
([safeThis = SafePointer<MainHostWindow> (this)] (int) ([safeThis] (int)
{ {
std::unique_ptr<XmlElement> audioState (safeThis->deviceManager.createStateXml()); std::unique_ptr<XmlElement> audioState (safeThis->deviceManager.createStateXml());