1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed some warnings caught by -pedantic_warnings

This commit is contained in:
jules 2015-09-15 10:42:09 +01:00
parent b9261dd8a9
commit fdc04d2d2c
25 changed files with 35 additions and 32 deletions

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)
}; };
//============================================================================== //==============================================================================

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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)
}; };

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));

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);

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)
}; };

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..

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)
}; };
}; };

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)
}; };

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)
}; };

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..

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..

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)
}; };
//============================================================================== //==============================================================================

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)
}; };