| @@ -101,7 +101,7 @@ public: | |||
| pairButton.setEnabled (false); | |||
| addAndMakeVisible (pairButton); | |||
| pairButton.onClick = [this] | |||
| pairButton.onClick = [] | |||
| { | |||
| RuntimePermissions::request (RuntimePermissions::bluetoothMidi, | |||
| [] (bool wasGranted) | |||
| @@ -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<float> (amplitude * sample); } ); | |||
| }; | |||
| } | |||
| //============================================================================== | |||
| const double decay = 0.998; | |||
| @@ -160,7 +160,7 @@ private: | |||
| Atomic<int> doPluckForNextBuffer; | |||
| std::vector<float> 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)); | |||
| } | |||
| } | |||
| } | |||
| @@ -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)); | |||
| } | |||
| } | |||
| } | |||
| @@ -160,7 +160,7 @@ struct SineSound : public SynthesiserSound | |||
| */ | |||
| struct SineVoice : public OscillatorBase | |||
| { | |||
| SineVoice() {}; | |||
| SineVoice() {} | |||
| bool canPlaySound (SynthesiserSound* sound) override { return dynamic_cast<SineSound*> (sound) != nullptr; } | |||
| @@ -191,7 +191,7 @@ struct SquareSound : public SynthesiserSound | |||
| */ | |||
| struct SquareVoice : public OscillatorBase | |||
| { | |||
| SquareVoice() {}; | |||
| SquareVoice() {} | |||
| bool canPlaySound (SynthesiserSound* sound) override { return dynamic_cast<SquareSound*> (sound) != nullptr; } | |||
| @@ -601,7 +601,7 @@ public: | |||
| #endif | |||
| setSize (600, 400); | |||
| }; | |||
| } | |||
| ~BlocksSynthDemo() | |||
| { | |||
| @@ -29,7 +29,8 @@ | |||
| </GROUP> | |||
| </MAINGROUP> | |||
| <EXPORTFORMATS> | |||
| <XCODE_MAC targetFolder="Builds/MacOSX" smallIcon="YyqWd2" bigIcon="YyqWd2"> | |||
| <XCODE_MAC targetFolder="Builds/MacOSX" smallIcon="YyqWd2" bigIcon="YyqWd2" | |||
| extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code"> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION isDebug="1" name="Debug"/> | |||
| <CONFIGURATION isDebug="0" name="Release"/> | |||
| @@ -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())); | |||
| @@ -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); | |||
| } | |||
| @@ -9,7 +9,7 @@ | |||
| </GROUP> | |||
| </MAINGROUP> | |||
| <EXPORTFORMATS> | |||
| <XCODE_MAC targetFolder="Builds/MacOSX" extraCompilerFlags="-Wall -Wshadow -Wstrict-aliasing -Wconversion -Wsign-compare -Woverloaded-virtual -Wextra-semi" | |||
| <XCODE_MAC targetFolder="Builds/MacOSX" extraCompilerFlags="-Wall -Wshadow -Wno-missing-field-initializers -Wshadow -Wshorten-64-to-32 -Wstrict-aliasing -Wuninitialized -Wunused-parameter -Wconversion -Wsign-compare -Wint-conversion -Wconditional-uninitialized -Woverloaded-virtual -Wreorder -Wconstant-conversion -Wsign-conversion -Wunused-private-field -Wbool-conversion -Wextra-semi -Wno-ignored-qualifiers -Wunreachable-code" | |||
| extraDefs=""> | |||
| <CONFIGURATIONS> | |||
| <CONFIGURATION name="Debug" osxCompatibility="10.10 SDK" isDebug="1" targetName="UnitTestRunner" | |||