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

Fix GCC Wshadow warnings

This commit is contained in:
ed 2021-09-13 12:58:35 +01:00
parent 9f20b8afe6
commit 24910cc4b4
14 changed files with 50 additions and 50 deletions

View file

@ -1625,16 +1625,16 @@ private:
class AttachedSlider : public ComponentWithParamMenu
{
public:
AttachedSlider (AudioProcessorEditor& editorIn, RangedAudioParameter& param)
: ComponentWithParamMenu (editorIn, param),
label ("", param.name),
attachment (param, slider)
AttachedSlider (AudioProcessorEditor& editorIn, RangedAudioParameter& paramIn)
: ComponentWithParamMenu (editorIn, paramIn),
label ("", paramIn.name),
attachment (paramIn, slider)
{
slider.addMouseListener (this, true);
addAllAndMakeVisible (*this, slider, label);
slider.setTextValueSuffix (" " + param.label);
slider.setTextValueSuffix (" " + paramIn.label);
label.attachToComponent (&slider, false);
label.setJustificationType (Justification::centred);
@ -1651,10 +1651,10 @@ private:
class AttachedToggle : public ComponentWithParamMenu
{
public:
AttachedToggle (AudioProcessorEditor& editorIn, RangedAudioParameter& param)
: ComponentWithParamMenu (editorIn, param),
toggle (param.name),
attachment (param, toggle)
AttachedToggle (AudioProcessorEditor& editorIn, RangedAudioParameter& paramIn)
: ComponentWithParamMenu (editorIn, paramIn),
toggle (paramIn.name),
attachment (paramIn, toggle)
{
toggle.addMouseListener (this, true);
addAndMakeVisible (toggle);
@ -1670,11 +1670,11 @@ private:
class AttachedCombo : public ComponentWithParamMenu
{
public:
AttachedCombo (AudioProcessorEditor& editorIn, RangedAudioParameter& param)
: ComponentWithParamMenu (editorIn, param),
combo (param),
label ("", param.name),
attachment (param, combo)
AttachedCombo (AudioProcessorEditor& editorIn, RangedAudioParameter& paramIn)
: ComponentWithParamMenu (editorIn, paramIn),
combo (paramIn),
label ("", paramIn.name),
attachment (paramIn, combo)
{
combo.addMouseListener (this, true);

View file

@ -100,9 +100,9 @@ public:
createProjectButton.onClick = [this]
{
chooser = std::make_unique<FileChooser> ("Save Project", NewProjectWizard::getLastWizardFolder());
auto flags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectDirectories;
auto browserFlags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectDirectories;
chooser->launchAsync (flags, [this] (const FileChooser& fc)
chooser->launchAsync (browserFlags, [this] (const FileChooser& fc)
{
auto dir = fc.getResult();

View file

@ -85,10 +85,10 @@ private:
class TreeSubItem : public TreeViewItem
{
public:
TreeSubItem (StartPageTreeHolder& o, const String& n, const StringArray& subItems)
: owner (o), name (n), isHeader (subItems.size() > 0)
TreeSubItem (StartPageTreeHolder& o, const String& n, const StringArray& subItemsIn)
: owner (o), name (n), isHeader (subItemsIn.size() > 0)
{
for (auto& s : subItems)
for (auto& s : subItemsIn)
addSubItem (new TreeSubItem (owner, s, {}));
}

View file

@ -76,11 +76,11 @@ public:
chooser = std::make_unique<FileChooser> ("Save PIP File",
File::getSpecialLocation (File::SpecialLocationType::userDesktopDirectory)
.getChildFile (nameValue.get().toString() + ".h"));
auto flags = FileBrowserComponent::saveMode
| FileBrowserComponent::canSelectFiles
| FileBrowserComponent::warnAboutOverwriting;
auto browserFlags = FileBrowserComponent::saveMode
| FileBrowserComponent::canSelectFiles
| FileBrowserComponent::warnAboutOverwriting;
chooser->launchAsync (flags, [this] (const FileChooser& fc)
chooser->launchAsync (browserFlags, [this] (const FileChooser& fc)
{
const auto result = fc.getResult();

View file

@ -1161,9 +1161,9 @@ public:
auto bundleDir = getOwner().getOutDirFile (config, outputFilename);
auto bundleContents = bundleDir + "\\Contents";
auto archDir = bundleContents + String ("\\") + (config.is64Bit() ? "x64" : "Win32");
auto executable = archDir + String ("\\") + outputFilename;
auto executablePath = archDir + String ("\\") + outputFilename;
auto pkgScript = String ("copy /Y ") + getOutputFilePath (config, false).quoted() + String (" ") + executable.quoted() + String ("\r\ncall ")
auto pkgScript = String ("copy /Y ") + getOutputFilePath (config, false).quoted() + String (" ") + executablePath.quoted() + String ("\r\ncall ")
+ createRebasedPath (bundleScript) + String (" ") + archDir.quoted() + String (" ") + createRebasedPath (iconFilePath);
if (config.isPluginBinaryCopyStepEnabled())

View file

@ -35,8 +35,8 @@ public:
ValueWithDefault valueToListenTo,
const String& propertyName,
int maxNumChars,
bool isMultiLine)
: TextPropertyComponent (valueToControl, propertyName, maxNumChars, isMultiLine),
bool multiLine)
: TextPropertyComponent (valueToControl, propertyName, maxNumChars, multiLine),
valueWithDefault (valueToListenTo),
value (valueWithDefault.getPropertyAsValue())
{

View file

@ -1396,9 +1396,9 @@ struct VST3PluginWindow : public AudioProcessorEditor,
}
#if JUCE_LINUX || JUCE_BSD
Steinberg::tresult PLUGIN_API queryInterface (const Steinberg::TUID iid, void** obj) override
Steinberg::tresult PLUGIN_API queryInterface (const Steinberg::TUID queryIid, void** obj) override
{
if (doUIDsMatch (iid, Steinberg::Linux::IRunLoop::iid))
if (doUIDsMatch (queryIid, Steinberg::Linux::IRunLoop::iid))
{
*obj = &runLoop.get();
return kResultTrue;

View file

@ -706,10 +706,10 @@ void Button::repeatTimerCallback()
class ButtonAccessibilityHandler : public AccessibilityHandler
{
public:
explicit ButtonAccessibilityHandler (Button& buttonToWrap, AccessibilityRole role)
explicit ButtonAccessibilityHandler (Button& buttonToWrap, AccessibilityRole roleIn)
: AccessibilityHandler (buttonToWrap,
isRadioButton (buttonToWrap) ? AccessibilityRole::radioButton : role,
getAccessibilityActions (buttonToWrap, role)),
isRadioButton (buttonToWrap) ? AccessibilityRole::radioButton : roleIn,
getAccessibilityActions (buttonToWrap, roleIn)),
button (buttonToWrap)
{
}

View file

@ -725,9 +725,9 @@ private:
warnAboutOverwritingExistingFiles,
[doSaveAs = std::forward<DoSaveAs> (doSaveAs),
doAskToOverwriteFile = std::forward<DoAskToOverwriteFile> (doAskToOverwriteFile),
callback = std::move (callback)] (SafeParentPointer ptr, File chosen)
callback = std::move (callback)] (SafeParentPointer parentPtr, File chosen)
{
if (ptr.shouldExitAsyncCallback())
if (parentPtr.shouldExitAsyncCallback())
return;
if (chosen == File{})
@ -738,18 +738,18 @@ private:
return;
}
auto updateAndSaveAs = [ptr, doSaveAs, callback] (const File& chosenFile)
auto updateAndSaveAs = [parentPtr, doSaveAs, callback] (const File& chosenFile)
{
if (ptr.shouldExitAsyncCallback())
if (parentPtr.shouldExitAsyncCallback())
return;
ptr->document.setLastDocumentOpened (chosenFile);
doSaveAs (ptr, chosenFile, false, false, true, callback, false);
parentPtr->document.setLastDocumentOpened (chosenFile);
doSaveAs (parentPtr, chosenFile, false, false, true, callback, false);
};
if (chosen.getFileExtension().isEmpty())
{
chosen = chosen.withFileExtension (ptr->fileExtension);
chosen = chosen.withFileExtension (parentPtr->fileExtension);
if (chosen.exists())
{
@ -765,7 +765,7 @@ private:
callback (userCancelledSave);
};
doAskToOverwriteFile (ptr, chosen, std::move (afterAsking));
doAskToOverwriteFile (parentPtr, chosen, std::move (afterAsking));
return;
}
}

View file

@ -151,7 +151,7 @@ private:
//==============================================================================
std::unique_ptr<Pimpl> browser;
bool blankPageShown = false, unloadPageWhenBrowserIsHidden;
bool blankPageShown = false, unloadPageWhenHidden;
String lastURL;
StringArray lastHeaders;
MemoryBlock lastPostData;

View file

@ -584,7 +584,7 @@ private:
//==============================================================================
WebBrowserComponent::WebBrowserComponent (const bool unloadWhenHidden)
: blankPageShown (false),
unloadPageWhenBrowserIsHidden (unloadWhenHidden)
unloadPageWhenHidden (unloadWhenHidden)
{
setOpaque (true);
@ -665,7 +665,7 @@ void WebBrowserComponent::checkWindowAssociation()
}
else
{
if (unloadPageWhenBrowserIsHidden && ! blankPageShown)
if (unloadPageWhenHidden && ! blankPageShown)
{
// when the component becomes invisible, some stuff like flash
// carries on playing audio, so we need to force it onto a blank

View file

@ -907,10 +907,10 @@ private:
//==============================================================================
WebBrowserComponent::WebBrowserComponent (const bool unloadWhenHidden)
: browser (new Pimpl (*this)),
unloadPageWhenBrowserIsHidden (unloadWhenHidden)
unloadPageWhenHidden (unloadWhenHidden)
{
ignoreUnused (blankPageShown);
ignoreUnused (unloadPageWhenBrowserIsHidden);
ignoreUnused (unloadPageWhenHidden);
setOpaque (true);

View file

@ -677,7 +677,7 @@ private:
//==============================================================================
WebBrowserComponent::WebBrowserComponent (bool unloadWhenHidden)
: unloadPageWhenBrowserIsHidden (unloadWhenHidden)
: unloadPageWhenHidden (unloadWhenHidden)
{
setOpaque (true);
browser.reset (new Pimpl (this));
@ -756,7 +756,7 @@ void WebBrowserComponent::checkWindowAssociation()
}
else
{
if (unloadPageWhenBrowserIsHidden && ! blankPageShown)
if (unloadPageWhenHidden && ! blankPageShown)
{
// when the component becomes invisible, some stuff like flash
// carries on playing audio, so we need to force it onto a blank

View file

@ -780,7 +780,7 @@ private:
//==============================================================================
WebBrowserComponent::WebBrowserComponent (bool unloadWhenHidden)
: browser (new Pimpl (*this, {}, {}, false)),
unloadPageWhenBrowserIsHidden (unloadWhenHidden)
unloadPageWhenHidden (unloadWhenHidden)
{
setOpaque (true);
}
@ -789,7 +789,7 @@ WebBrowserComponent::WebBrowserComponent (bool unloadWhenHidden,
const File& dllLocation,
const File& userDataFolder)
: browser (new Pimpl (*this, dllLocation, userDataFolder, true)),
unloadPageWhenBrowserIsHidden (unloadWhenHidden)
unloadPageWhenHidden (unloadWhenHidden)
{
setOpaque (true);
}
@ -875,7 +875,7 @@ void WebBrowserComponent::checkWindowAssociation()
}
else
{
if (browser != nullptr && unloadPageWhenBrowserIsHidden && ! blankPageShown)
if (browser != nullptr && unloadPageWhenHidden && ! blankPageShown)
{
// when the component becomes invisible, some stuff like flash
// carries on playing audio, so we need to force it onto a blank