From 27fad0f97595d292fc5c2d7dd24bb8bc586be84a Mon Sep 17 00:00:00 2001 From: Anthony Nicholls Date: Wed, 13 Sep 2023 15:02:46 +0100 Subject: [PATCH] AudioDeviceSelector: Use make_unique instead of reset --- .../gui/juce_AudioDeviceSelectorComponent.cpp | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp index fcf922ee15..c14e66149a 100644 --- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp @@ -205,7 +205,7 @@ struct AudioDeviceSetupDetails bool useStereoPairs; }; -static String getNoDeviceString() { return "<< " + TRANS("none") + " >>"; } +static String getNoDeviceString() { return "<< " + TRANS ("none") + " >>"; } //============================================================================== class AudioDeviceSettingsPanel : public Component, @@ -218,7 +218,7 @@ public: { if (hideAdvancedOptionsWithButton) { - showAdvancedSettingsButton.reset (new TextButton (TRANS("Show advanced settings..."))); + showAdvancedSettingsButton = std::make_unique (TRANS ("Show advanced settings...")); addAndMakeVisible (showAdvancedSettingsButton.get()); showAdvancedSettingsButton->setClickingTogglesState (true); showAdvancedSettingsButton->onClick = [this] { toggleAdvancedSettings(); }; @@ -460,10 +460,10 @@ public: { if (outputChanList == nullptr) { - outputChanList.reset (new ChannelSelectorListBox (setup, ChannelSelectorListBox::audioOutputType, - TRANS ("(no audio output channels found)"))); + outputChanList = std::make_unique (setup, ChannelSelectorListBox::audioOutputType, + TRANS ("(no audio output channels found)")); addAndMakeVisible (outputChanList.get()); - outputChanLabel.reset (new Label ({}, TRANS("Active output channels:"))); + outputChanLabel = std::make_unique