Browse Source

Fixed some warnings caught by -pedantic_warnings

tags/2021-05-28
jules 9 years ago
parent
commit
fdc04d2d2c
25 changed files with 35 additions and 32 deletions
  1. +1
    -1
      examples/Demo/Source/Demos/AudioLatencyDemo.cpp
  2. +1
    -1
      examples/Demo/Source/Demos/AudioLiveScrollingDisplay.h
  3. +1
    -1
      examples/Demo/Source/Demos/AudioPlaybackDemo.cpp
  4. +1
    -1
      examples/Demo/Source/Demos/AudioSettingsDemo.cpp
  5. +1
    -1
      examples/Demo/Source/Demos/CodeEditorDemo.cpp
  6. +2
    -2
      examples/Demo/Source/Demos/ComponentTransformsDemo.cpp
  7. +1
    -1
      examples/Demo/Source/Demos/DialogsDemo.cpp
  8. +2
    -2
      examples/Demo/Source/Demos/GraphicsDemo.cpp
  9. +1
    -1
      examples/Demo/Source/Demos/KeyMappingsDemo.cpp
  10. +1
    -1
      examples/Demo/Source/Demos/LiveConstantDemo.cpp
  11. +1
    -1
      examples/Demo/Source/Demos/LookAndFeelDemo.cpp
  12. +3
    -3
      examples/Demo/Source/Demos/MDIDemo.cpp
  13. +1
    -1
      examples/Demo/Source/Demos/MidiDemo.cpp
  14. +1
    -1
      examples/Demo/Source/Demos/MultithreadingDemo.cpp
  15. +2
    -1
      examples/Demo/Source/Demos/OpenGLDemo.cpp
  16. +3
    -1
      examples/Demo/Source/Demos/OpenGLDemo2D.cpp
  17. +2
    -2
      examples/Demo/Source/Demos/PropertiesDemo.cpp
  18. +1
    -1
      examples/Demo/Source/Demos/SystemInfoDemo.cpp
  19. +3
    -3
      examples/Demo/Source/Demos/UnitTestsDemo.cpp
  20. +1
    -1
      examples/Demo/Source/Demos/ValueTreesDemo.cpp
  21. +1
    -1
      examples/Demo/Source/Demos/WebBrowserDemo.cpp
  22. +1
    -1
      examples/Demo/Source/Demos/WidgetsDemo.cpp
  23. +1
    -1
      examples/Demo/Source/Demos/WindowsDemo.cpp
  24. +1
    -1
      modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp
  25. +1
    -1
      modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h

+ 1
- 1
examples/Demo/Source/Demos/AudioLatencyDemo.cpp View File

@@ -284,7 +284,7 @@ private:
: (recordedStart - referenceStart); : (recordedStart - referenceStart);
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LatencyTester);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LatencyTester)
}; };
//============================================================================== //==============================================================================


+ 1
- 1
examples/Demo/Source/Demos/AudioLiveScrollingDisplay.h View File

@@ -76,7 +76,7 @@ public:
zeromem (outputChannel, sizeof (float) * (size_t) numSamples); zeromem (outputChannel, sizeof (float) * (size_t) numSamples);
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveScrollingAudioDisplay)
}; };


+ 1
- 1
examples/Demo/Source/Demos/AudioPlaybackDemo.cpp View File

@@ -415,7 +415,7 @@ private:
showFile (thumbnail->getLastDroppedFile()); showFile (thumbnail->getLastDroppedFile());
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPlaybackDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioPlaybackDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/AudioSettingsDemo.cpp View File

@@ -123,7 +123,7 @@ private:
return bits.joinIntoString (", "); return bits.joinIntoString (", ");
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSettingsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSettingsDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/CodeEditorDemo.cpp View File

@@ -89,7 +89,7 @@ private:
editor->loadContent (fileChooser.getCurrentFile().loadFileAsString()); editor->loadContent (fileChooser.getCurrentFile().loadFileAsString());
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CodeEditorDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CodeEditorDemo)
}; };


+ 2
- 2
examples/Demo/Source/Demos/ComponentTransformsDemo.cpp View File

@@ -125,7 +125,7 @@ private:
ComponentBoundsConstrainer constrainer; ComponentBoundsConstrainer constrainer;
ComponentDragger dragger; ComponentDragger dragger;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CornerDragger);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CornerDragger)
}; };
OwnedArray<CornerDragger> draggers; OwnedArray<CornerDragger> draggers;
@@ -147,7 +147,7 @@ private:
0, (float) content->getHeight(), p2.x, p2.y)); 0, (float) content->getHeight(), p2.x, p2.y));
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentTransformsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ComponentTransformsDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/DialogsDemo.cpp View File

@@ -357,7 +357,7 @@ private:
return showWindow (*button, static_cast<DialogType> (i)); return showWindow (*button, static_cast<DialogType> (i));
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DialogsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DialogsDemo)
}; };


+ 2
- 2
examples/Demo/Source/Demos/GraphicsDemo.cpp View File

@@ -668,7 +668,7 @@ private:
ListBox listBox; ListBox listBox;
OwnedArray<GraphicsDemoBase> demos; OwnedArray<GraphicsDemoBase> demos;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestListComponent);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestListComponent)
}; };
//============================================================================== //==============================================================================
@@ -706,7 +706,7 @@ private:
Label performanceDisplay; Label performanceDisplay;
TestListComponent testList; TestListComponent testList;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GraphicsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GraphicsDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/KeyMappingsDemo.cpp View File

@@ -49,7 +49,7 @@ public:
private: private:
KeyMappingEditorComponent keyMappingEditor; KeyMappingEditorComponent keyMappingEditor;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (KeyMappingsDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/LiveConstantDemo.cpp View File

@@ -108,7 +108,7 @@ private:
dontSendNotification); dontSendNotification);
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveConstantEditorDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LiveConstantEditorDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/LookAndFeelDemo.cpp View File

@@ -606,7 +606,7 @@ private:
lafBox.setSelectedItemIndex (Random::getSystemRandom().nextInt (lafBox.getNumItems())); lafBox.setSelectedItemIndex (Random::getSystemRandom().nextInt (lafBox.getNumItems()));
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeelDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (LookAndFeelDemo)
}; };


+ 3
- 3
examples/Demo/Source/Demos/MDIDemo.cpp View File

@@ -116,7 +116,7 @@ private:
void textEditorEscapeKeyPressed (TextEditor&) override {} void textEditorEscapeKeyPressed (TextEditor&) override {}
void textEditorFocusLost (TextEditor&) override {} void textEditorFocusLost (TextEditor&) override {}
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Note);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Note)
}; };
@@ -146,7 +146,7 @@ public:
} }
private: private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoMultiDocumentPanel);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (DemoMultiDocumentPanel)
}; };
//============================================================================== //==============================================================================
@@ -264,7 +264,7 @@ private:
addNote (String ("Note ") + String (multiDocumentPanel.getNumDocuments() + 1), "Hello World!"); addNote (String ("Note ") + String (multiDocumentPanel.getNumDocuments() + 1), "Hello World!");
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MDIDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MDIDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/MidiDemo.cpp View File

@@ -259,7 +259,7 @@ private:
messageListBox.repaint(); messageListBox.repaint();
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MidiDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/MultithreadingDemo.cpp View File

@@ -332,7 +332,7 @@ private:
demoComponent->setUsingPool (result == 2); demoComponent->setUsingPool (result == 2);
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MultithreadingDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MultithreadingDemo)
}; };


+ 2
- 1
examples/Demo/Source/Demos/OpenGLDemo.cpp View File

@@ -586,7 +586,8 @@ struct OpenGLDemoClasses
scale (0.5f), rotationSpeed (0.0f), rotation (0.0f), scale (0.5f), rotationSpeed (0.0f), rotation (0.0f),
textureToUse (nullptr) textureToUse (nullptr)
{ {
MainAppWindow::getMainAppWindow()->setRenderingEngine (0);
if (MainAppWindow* mw = MainAppWindow::getMainAppWindow())
mw->setRenderingEngine (0);
setOpaque (true); setOpaque (true);
addAndMakeVisible (controlsOverlay = new DemoControlsOverlay (*this)); addAndMakeVisible (controlsOverlay = new DemoControlsOverlay (*this));


+ 3
- 1
examples/Demo/Source/Demos/OpenGLDemo2D.cpp View File

@@ -37,7 +37,9 @@ public:
: fragmentEditorComp (fragmentDocument, nullptr) : fragmentEditorComp (fragmentDocument, nullptr)
{ {
setOpaque (true); setOpaque (true);
MainAppWindow::getMainAppWindow()->setOpenGLRenderingEngine();
if (MainAppWindow* mw = MainAppWindow::getMainAppWindow())
mw->setOpenGLRenderingEngine();
addAndMakeVisible (statusLabel); addAndMakeVisible (statusLabel);
statusLabel.setJustificationType (Justification::topLeft); statusLabel.setJustificationType (Justification::topLeft);


+ 2
- 2
examples/Demo/Source/Demos/PropertiesDemo.cpp View File

@@ -169,7 +169,7 @@ public:
private: private:
PropertyPanel propertyPanel; PropertyPanel propertyPanel;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PropertiesDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PropertiesDemo)
}; };
//============================================================================== //==============================================================================
@@ -235,7 +235,7 @@ private:
concertinaPanel.setMaximumPanelSize (panel, panel->getTotalContentHeight()); concertinaPanel.setMaximumPanelSize (panel, panel->getTotalContentHeight());
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ConcertinaDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/SystemInfoDemo.cpp View File

@@ -184,7 +184,7 @@ public:
private: private:
TextEditor resultsBox; TextEditor resultsBox;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SystemInfoDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SystemInfoDemo)
}; };
// This static object will register this demo type in a global list of demos.. // This static object will register this demo type in a global list of demos..


+ 3
- 3
examples/Demo/Source/Demos/UnitTestsDemo.cpp View File

@@ -53,7 +53,7 @@ struct UnitTestClasses
private: private:
TestRunnerThread& owner; TestRunnerThread& owner;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomTestRunner);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CustomTestRunner)
}; };
//============================================================================== //==============================================================================
@@ -93,7 +93,7 @@ struct UnitTestClasses
private: private:
UnitTestsDemo& owner; UnitTestsDemo& owner;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TestRunnerThread)
}; };
@@ -183,7 +183,7 @@ struct UnitTestClasses
TextButton startTestButton; TextButton startTestButton;
TextEditor testResultsBox; TextEditor testResultsBox;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UnitTestsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (UnitTestsDemo)
}; };
}; };


+ 1
- 1
examples/Demo/Source/Demos/ValueTreesDemo.cpp View File

@@ -290,7 +290,7 @@ private:
undoManager.beginNewTransaction(); undoManager.beginNewTransaction();
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValueTreesDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ValueTreesDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/WebBrowserDemo.cpp View File

@@ -137,7 +137,7 @@ private:
webView->goToURL (addressTextBox.getText()); webView->goToURL (addressTextBox.getText());
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WebBrowserDemo)
}; };


+ 1
- 1
examples/Demo/Source/Demos/WidgetsDemo.cpp View File

@@ -1547,7 +1547,7 @@ public:
private: private:
DemoTabbedComponent tabs; DemoTabbedComponent tabs;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WidgetsDemo)
}; };
// This static object will register this demo type in a global list of demos.. // This static object will register this demo type in a global list of demos..


+ 1
- 1
examples/Demo/Source/Demos/WindowsDemo.cpp View File

@@ -323,7 +323,7 @@ private:
closeAllWindows(); closeAllWindows();
} }
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsDemo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (WindowsDemo)
}; };
// This static object will register this demo type in a global list of demos.. // This static object will register this demo type in a global list of demos..


+ 1
- 1
modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp View File

@@ -75,7 +75,7 @@ struct AudioVisualiserComponent::ChannelInfo
Range<float> value; Range<float> value;
int nextSample, subSample; int nextSample, subSample;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelInfo);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ChannelInfo)
}; };
//============================================================================== //==============================================================================


+ 1
- 1
modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.h View File

@@ -128,7 +128,7 @@ private:
void timerCallback() override; void timerCallback() override;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioVisualiserComponent);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioVisualiserComponent)
}; };


Loading…
Cancel
Save