diff --git a/Editor/foleys_StyleColourPropertyComponent.cpp b/Editor/foleys_StyleColourPropertyComponent.cpp index f32d769f..05894481 100644 --- a/Editor/foleys_StyleColourPropertyComponent.cpp +++ b/Editor/foleys_StyleColourPropertyComponent.cpp @@ -254,9 +254,9 @@ juce::Colour StyleColourPropertyComponent::ColourPanel::ColourSelectorWithSwatch return swatchColours [size_t (index)]; } -void StyleColourPropertyComponent::ColourPanel::ColourSelectorWithSwatches::setSwatchColour (int index, const juce::Colour& colour) +void StyleColourPropertyComponent::ColourPanel::ColourSelectorWithSwatches::setSwatchColour (int index, const juce::Colour& newColour) { - swatchColours [size_t (index)] = colour; + swatchColours [size_t (index)] = newColour; } void StyleColourPropertyComponent::ColourPanel::ColourSelectorWithSwatches::loadSwatches() @@ -281,8 +281,8 @@ void StyleColourPropertyComponent::ColourPanel::ColourSelectorWithSwatches::save coloursNode->deleteAllChildElements(); for (int i = 0; i < int (swatchColours.size()); ++i) { - auto* node = coloursNode->createNewChildElement (IDs::colour); - node->addTextElement (swatchColours [size_t (i)].toDisplayString (true)); + auto* colourNode = coloursNode->createNewChildElement (IDs::colour); + colourNode->addTextElement (swatchColours [size_t (i)].toDisplayString (true)); } p->setValue (IDs::swatches, coloursNode.get()); diff --git a/Editor/foleys_StyleGradientPropertyComponent.cpp b/Editor/foleys_StyleGradientPropertyComponent.cpp index 93e860ba..4ff5b29a 100644 --- a/Editor/foleys_StyleGradientPropertyComponent.cpp +++ b/Editor/foleys_StyleGradientPropertyComponent.cpp @@ -240,9 +240,9 @@ juce::Colour StyleGradientPropertyComponent::GradientPanel::ColourSelectorWithSw return swatchColours [size_t (index)]; } -void StyleGradientPropertyComponent::GradientPanel::ColourSelectorWithSwatches::setSwatchColour (int index, const juce::Colour& colour) +void StyleGradientPropertyComponent::GradientPanel::ColourSelectorWithSwatches::setSwatchColour (int index, const juce::Colour& newColour) { - swatchColours [size_t (index)] = colour; + swatchColours [size_t (index)] = newColour; } void StyleGradientPropertyComponent::GradientPanel::ColourSelectorWithSwatches::loadSwatches() @@ -267,8 +267,8 @@ void StyleGradientPropertyComponent::GradientPanel::ColourSelectorWithSwatches:: coloursNode->deleteAllChildElements(); for (int i = 0; i < int (swatchColours.size()); ++i) { - auto* node = coloursNode->createNewChildElement (IDs::colour); - node->addTextElement (swatchColours [size_t (i)].toDisplayString (true)); + auto* colourNode = coloursNode->createNewChildElement (IDs::colour); + colourNode->addTextElement (swatchColours [size_t (i)].toDisplayString (true)); } p->setValue (IDs::swatches, coloursNode.get()); diff --git a/Editor/foleys_ToolBox.cpp b/Editor/foleys_ToolBox.cpp index e877010a..945adbe8 100644 --- a/Editor/foleys_ToolBox.cpp +++ b/Editor/foleys_ToolBox.cpp @@ -362,9 +362,9 @@ juce::File ToolBox::getLastLocation() const { juce::File lastLocation; - juce::ApplicationProperties properties; - properties.setStorageParameters (ToolBox::getApplicationPropertyStorage()); - if (auto* p = properties.getUserSettings()) + juce::ApplicationProperties appProperties; + appProperties.setStorageParameters (ToolBox::getApplicationPropertyStorage()); + if (auto* p = appProperties.getUserSettings()) lastLocation = juce::File (p->getValue (IDs::lastLocation)); if (lastLocation.exists()) @@ -390,9 +390,9 @@ juce::File ToolBox::getLastLocation() const void ToolBox::setLastLocation(juce::File file) { - juce::ApplicationProperties properties; - properties.setStorageParameters (ToolBox::getApplicationPropertyStorage()); - if (auto* p = properties.getUserSettings()) + juce::ApplicationProperties appProperties; + appProperties.setStorageParameters (ToolBox::getApplicationPropertyStorage()); + if (auto* p = appProperties.getUserSettings()) p->setValue (IDs::lastLocation, file.getFullPathName()); } diff --git a/General/foleys_Resources.cpp b/General/foleys_Resources.cpp index 44d56353..c0e8d97e 100644 --- a/General/foleys_Resources.cpp +++ b/General/foleys_Resources.cpp @@ -37,7 +37,7 @@ namespace BinaryDataFallbacks { const int namedResourceListSize = 0; -const char* namedResourceList[]{}; +const char** namedResourceList = nullptr; const char* getNamedResource(const char*, int&) { return nullptr; } } // namespace BinaryDataFallbacks diff --git a/Layout/foleys_Decorator.cpp b/Layout/foleys_Decorator.cpp index ab9ab52b..c5ebf36b 100644 --- a/Layout/foleys_Decorator.cpp +++ b/Layout/foleys_Decorator.cpp @@ -135,7 +135,7 @@ Decorator::ClientBounds Decorator::getClientBounds (juce::Rectangle overall else { juce::Font f (captionSize * 0.8f); - auto w = f.getStringWidth (caption); + auto w = float (f.getStringWidth (caption)); if (justification.getOnlyHorizontalFlags() & juce::Justification::left) captionBox = box.removeFromLeft (w).toNearestInt(); diff --git a/Layout/foleys_GuiItem.cpp b/Layout/foleys_GuiItem.cpp index e4ecbbe5..6a1e53f3 100644 --- a/Layout/foleys_GuiItem.cpp +++ b/Layout/foleys_GuiItem.cpp @@ -91,8 +91,8 @@ void GuiItem::updateInternal() { auto& stylesheet = magicBuilder.getStylesheet(); - if (auto* lookAndFeel = stylesheet.getLookAndFeel (configNode)) - setLookAndFeel (lookAndFeel); + if (auto* newLookAndFeel = stylesheet.getLookAndFeel (configNode)) + setLookAndFeel (newLookAndFeel); decorator.configure (magicBuilder, configNode); configureComponent(); diff --git a/State/foleys_MagicProcessorState.cpp b/State/foleys_MagicProcessorState.cpp index e4ac4de3..869a9a8e 100644 --- a/State/foleys_MagicProcessorState.cpp +++ b/State/foleys_MagicProcessorState.cpp @@ -142,11 +142,11 @@ bool MagicProcessorState::getLastEditorSize (int& width, int& height) void MagicProcessorState::getStateInformation (juce::MemoryBlock& destData) { - auto state = getValueTree(); - parameters.saveParameterValues (state); + auto newState = getValueTree(); + parameters.saveParameterValues (newState); juce::MemoryOutputStream stream (destData, false); - state.writeToStream (stream); + newState.writeToStream (stream); } void MagicProcessorState::setStateInformation (const void* data, int sizeInBytes, juce::AudioProcessorEditor* editor) @@ -155,13 +155,13 @@ void MagicProcessorState::setStateInformation (const void* data, int sizeInBytes if (tree.isValid() == false) return; - auto state = getValueTree(); - if (state.getType() != tree.getType()) + auto newState = getValueTree(); + if (newState.getType() != tree.getType()) return; - state.copyPropertiesAndChildrenFrom (tree, nullptr); + newState.copyPropertiesAndChildrenFrom (tree, nullptr); - parameters.loadParameterValues (state); + parameters.loadParameterValues (newState); if (editor) {