diff --git a/examples/Audio/MidiDemo.h b/examples/Audio/MidiDemo.h index 368e79a06e..96f6b7ffaa 100644 --- a/examples/Audio/MidiDemo.h +++ b/examples/Audio/MidiDemo.h @@ -101,7 +101,7 @@ public: pairButton.setEnabled (false); addAndMakeVisible (pairButton); - pairButton.onClick = [this] + pairButton.onClick = [] { RuntimePermissions::request (RuntimePermissions::bluetoothMidi, [] (bool wasGranted) diff --git a/examples/Audio/PluckedStringsDemo.h b/examples/Audio/PluckedStringsDemo.h index 9ab3ecabf1..cf3b02b967 100644 --- a/examples/Audio/PluckedStringsDemo.h +++ b/examples/Audio/PluckedStringsDemo.h @@ -109,7 +109,7 @@ public: // cycle through the delay line and apply a simple averaging filter for (auto i = 0; i < numSamples; ++i) { - auto nextPos = (int) ((pos + 1) % delayLine.size()); + auto nextPos = (pos + 1) % delayLine.size(); delayLine[nextPos] = (float) (decay * 0.5 * (delayLine[nextPos] + delayLine[pos])); outBuffer[i] += delayLine[pos]; @@ -151,7 +151,7 @@ private: excitationSample.end(), delayLine.begin(), [this] (double sample) { return static_cast (amplitude * sample); } ); - }; + } //============================================================================== const double decay = 0.998; @@ -160,7 +160,7 @@ private: Atomic doPluckForNextBuffer; std::vector excitationSample, delayLine; - int pos = 0; + size_t pos = 0; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (StringSynthesiser) }; @@ -294,7 +294,7 @@ public: { memcpy (channelData, bufferToFill.buffer->getReadPointer (0), - bufferToFill.numSamples * sizeof (float)); + ((size_t) bufferToFill.numSamples) * sizeof (float)); } } } diff --git a/examples/BLOCKS/BlocksDrawingDemo.h b/examples/BLOCKS/BlocksDrawingDemo.h index 9dab5bb2bf..a2b241785e 100644 --- a/examples/BLOCKS/BlocksDrawingDemo.h +++ b/examples/BLOCKS/BlocksDrawingDemo.h @@ -531,7 +531,7 @@ private: for (uint32 y = 0; y < 15; ++ y) { canvasProgram->setLED (x, y, Colours::black); - lightpadComponent.setLEDColour (x, y, Colours::black); + lightpadComponent.setLEDColour ((int) x, (int) y, Colours::black); } } @@ -554,7 +554,7 @@ private: if (index >= 0) { canvasProgram->setLED (x0, y0, Colours::black); - lightpadComponent.setLEDColour (x0, y0, Colours::black); + lightpadComponent.setLEDColour ((int) x0, (int) y0, Colours::black); activeLeds.remove (index); } @@ -574,7 +574,7 @@ private: activeLeds.add (led); canvasProgram->setLED (led.x, led.y, led.colour.withBrightness (led.brightness)); - lightpadComponent.setLEDColour (led.x, led.y, led.colour.withBrightness (led.brightness)); + lightpadComponent.setLEDColour ((int) led.x, (int) led.y, led.colour.withBrightness (led.brightness)); return; } @@ -594,7 +594,7 @@ private: if (canvasProgram != nullptr) canvasProgram->setLED (currentLed.x, currentLed.y, currentLed.colour.withBrightness (currentLed.brightness)); - lightpadComponent.setLEDColour (currentLed.x, currentLed.y, currentLed.colour.withBrightness (currentLed.brightness)); + lightpadComponent.setLEDColour ((int) currentLed.x, (int) currentLed.y, currentLed.colour.withBrightness (currentLed.brightness)); activeLeds.set (index, currentLed); } @@ -609,7 +609,7 @@ private: for (auto led : activeLeds) { canvasProgram->setLED (led.x, led.y, led.colour.withBrightness (led.brightness)); - lightpadComponent.setLEDColour (led.x, led.y, led.colour.withBrightness (led.brightness)); + lightpadComponent.setLEDColour ((int) led.x, (int) led.y, led.colour.withBrightness (led.brightness)); } } } diff --git a/examples/BLOCKS/BlocksSynthDemo.h b/examples/BLOCKS/BlocksSynthDemo.h index 82f3ed1f70..b2ab1e1c6b 100644 --- a/examples/BLOCKS/BlocksSynthDemo.h +++ b/examples/BLOCKS/BlocksSynthDemo.h @@ -160,7 +160,7 @@ struct SineSound : public SynthesiserSound */ struct SineVoice : public OscillatorBase { - SineVoice() {}; + SineVoice() {} bool canPlaySound (SynthesiserSound* sound) override { return dynamic_cast (sound) != nullptr; } @@ -191,7 +191,7 @@ struct SquareSound : public SynthesiserSound */ struct SquareVoice : public OscillatorBase { - SquareVoice() {}; + SquareVoice() {} bool canPlaySound (SynthesiserSound* sound) override { return dynamic_cast (sound) != nullptr; } @@ -601,7 +601,7 @@ public: #endif setSize (600, 400); - }; + } ~BlocksSynthDemo() { diff --git a/examples/DemoRunner/DemoRunner.jucer b/examples/DemoRunner/DemoRunner.jucer index bd4b426d7d..7a8c0ebeae 100644 --- a/examples/DemoRunner/DemoRunner.jucer +++ b/examples/DemoRunner/DemoRunner.jucer @@ -29,7 +29,8 @@ - + diff --git a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp index ea69439aaa..68d93d4368 100644 --- a/examples/DemoRunner/Source/UI/DemoContentComponent.cpp +++ b/examples/DemoRunner/Source/UI/DemoContentComponent.cpp @@ -69,7 +69,7 @@ struct CodeContent : public Component codeEditor.setScrollbarThickness (8); lookAndFeelChanged(); - }; + } void resized() override { @@ -135,7 +135,7 @@ void DemoContentComponent::setDemo (const String& category, int selectedDemoInde && (currentDemoIndex == selectedDemoIndex)) return; - auto demo = JUCEDemos::getCategory (category).demos[selectedDemoIndex]; + auto demo = JUCEDemos::getCategory (category).demos[(size_t) selectedDemoIndex]; #if ! (JUCE_ANDROID || JUCE_IOS) codeContent->document.replaceAllContent (trimPIP (demo.demoFile.loadFileAsString())); diff --git a/examples/DemoRunner/Source/UI/MainComponent.cpp b/examples/DemoRunner/Source/UI/MainComponent.cpp index f948d19858..ebc77d570e 100644 --- a/examples/DemoRunner/Source/UI/MainComponent.cpp +++ b/examples/DemoRunner/Source/UI/MainComponent.cpp @@ -170,7 +170,7 @@ public: if (selectedCategory.isEmpty()) { if (isPositiveAndBelow (rowNumber, JUCEDemos::getCategories().size())) - g.drawFittedText (JUCEDemos::getCategories()[rowNumber].name, + g.drawFittedText (JUCEDemos::getCategories()[(size_t) rowNumber].name, bounds, Justification::centred, 1); } else @@ -178,7 +178,7 @@ public: auto& category = JUCEDemos::getCategory (selectedCategory); if (isPositiveAndBelow (rowNumber, category.demos.size())) - g.drawFittedText (category.demos[rowNumber].demoFile.getFileName(), + g.drawFittedText (category.demos[(size_t) rowNumber].demoFile.getFileName(), bounds, Justification::centred, 1); } } @@ -191,11 +191,11 @@ public: void selectedRowsChanged (int row) override { - if (row == -1) + if (row < 0) return; if (selectedCategory.isEmpty()) - showCategory (JUCEDemos::getCategories()[row].name); + showCategory (JUCEDemos::getCategories()[(size_t) row].name); else demoHolder.setDemo (selectedCategory, row); } diff --git a/extras/UnitTestRunner/UnitTestRunner.jucer b/extras/UnitTestRunner/UnitTestRunner.jucer index 261a3c3ea5..015d50ab8b 100644 --- a/extras/UnitTestRunner/UnitTestRunner.jucer +++ b/extras/UnitTestRunner/UnitTestRunner.jucer @@ -9,7 +9,7 @@ -