Browse Source

Fix GCC Wshadow warnings

v6.1.6
ed 4 years ago
parent
commit
24910cc4b4
14 changed files with 50 additions and 50 deletions
  1. +14
    -14
      examples/Plugins/DSPModulePluginDemo.h
  2. +2
    -2
      extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h
  3. +3
    -3
      extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h
  4. +4
    -4
      extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h
  5. +2
    -2
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h
  6. +2
    -2
      extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_PropertyComponentsWithEnablement.h
  7. +2
    -2
      modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp
  8. +3
    -3
      modules/juce_gui_basics/buttons/juce_Button.cpp
  9. +8
    -8
      modules/juce_gui_extra/documents/juce_FileBasedDocument.cpp
  10. +1
    -1
      modules/juce_gui_extra/misc/juce_WebBrowserComponent.h
  11. +2
    -2
      modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp
  12. +2
    -2
      modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp
  13. +2
    -2
      modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm
  14. +3
    -3
      modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp

+ 14
- 14
examples/Plugins/DSPModulePluginDemo.h 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);


+ 2
- 2
extras/Projucer/Source/Application/StartPage/jucer_ContentComponents.h 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();


+ 3
- 3
extras/Projucer/Source/Application/StartPage/jucer_StartPageTreeHolder.h 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, {}));
}


+ 4
- 4
extras/Projucer/Source/Application/Windows/jucer_PIPCreatorWindowComponent.h 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();


+ 2
- 2
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_MSVC.h 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())


+ 2
- 2
extras/Projucer/Source/Utility/UI/PropertyComponents/jucer_PropertyComponentsWithEnablement.h 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())
{


+ 2
- 2
modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp 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;


+ 3
- 3
modules/juce_gui_basics/buttons/juce_Button.cpp 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)
{
}


+ 8
- 8
modules/juce_gui_extra/documents/juce_FileBasedDocument.cpp 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;
}
}


+ 1
- 1
modules/juce_gui_extra/misc/juce_WebBrowserComponent.h 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;


+ 2
- 2
modules/juce_gui_extra/native/juce_android_WebBrowserComponent.cpp 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


+ 2
- 2
modules/juce_gui_extra/native/juce_linux_X11_WebBrowserComponent.cpp 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);


+ 2
- 2
modules/juce_gui_extra/native/juce_mac_WebBrowserComponent.mm 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


+ 3
- 3
modules/juce_gui_extra/native/juce_win32_WebBrowserComponent.cpp 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


Loading…
Cancel
Save