diff --git a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp
index bc9822f8d3..d5a7a32f7f 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp
+++ b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.cpp
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 1:54:50pm
+ Creation date: 20 Sep 2012 1:43:09pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
diff --git a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h
index 6ee1efaee9..f70b791d57 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h
+++ b/extras/JuceDemo/Source/demos/AudioDemoLatencyPage.h
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 1:54:50pm
+ Creation date: 20 Sep 2012 1:43:09pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -19,8 +19,8 @@
==============================================================================
*/
-#ifndef __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_7C897E97__
-#define __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_7C897E97__
+#ifndef __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_623CCFC4__
+#define __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_623CCFC4__
//[Headers] -- You can add your own extra header files here --
#include "../jucedemo_headers.h"
@@ -56,9 +56,6 @@ public:
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
AudioDeviceManager& deviceManager;
@@ -72,10 +69,8 @@ private:
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- AudioDemoLatencyPage (const AudioDemoLatencyPage&);
- const AudioDemoLatencyPage& operator= (const AudioDemoLatencyPage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoLatencyPage);
};
-#endif // __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_7C897E97__
+#endif // __JUCER_HEADER_AUDIODEMOLATENCYPAGE_AUDIODEMOLATENCYPAGE_623CCFC4__
diff --git a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp
index ef2ffc9665..7c9eaae79f 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp
+++ b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.cpp
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:08:14pm
+ Creation date: 20 Sep 2012 1:43:44pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -24,6 +24,7 @@
#include "AudioDemoPlaybackPage.h"
+
//[MiscUserDefs] You can add your own user definitions and misc code here...
class DemoThumbnailComp : public Component,
public ChangeListener,
@@ -176,11 +177,11 @@ AudioDemoPlaybackPage::AudioDemoPlaybackPage (AudioDeviceManager& deviceManager_
thread ("audio file preview"),
directoryList (0, thread),
zoomLabel (0),
+ explanation (0),
+ zoomSlider (0),
thumbnail (0),
startStopButton (0),
- fileTreeComp (0),
- explanation (0),
- zoomSlider (0)
+ fileTreeComp (0)
{
addAndMakeVisible (zoomLabel = new Label (String::empty,
L"zoom:"));
@@ -214,6 +215,7 @@ AudioDemoPlaybackPage::AudioDemoPlaybackPage (AudioDeviceManager& deviceManager_
addAndMakeVisible (fileTreeComp = new FileTreeComponent (directoryList));
+
//[UserPreSize]
//[/UserPreSize]
@@ -245,11 +247,11 @@ AudioDemoPlaybackPage::~AudioDemoPlaybackPage()
//[/Destructor_pre]
deleteAndZero (zoomLabel);
+ deleteAndZero (explanation);
+ deleteAndZero (zoomSlider);
deleteAndZero (thumbnail);
deleteAndZero (startStopButton);
deleteAndZero (fileTreeComp);
- deleteAndZero (explanation);
- deleteAndZero (zoomSlider);
//[Destructor]. You can add your own custom destruction code here..
@@ -271,15 +273,31 @@ void AudioDemoPlaybackPage::paint (Graphics& g)
void AudioDemoPlaybackPage::resized()
{
zoomLabel->setBounds (16, getHeight() - 90, 55, 24);
+ explanation->setBounds (256, getHeight() - 82, getWidth() - 275, 64);
+ zoomSlider->setBounds (72, getHeight() - 90, 200, 24);
thumbnail->setBounds (16, getHeight() - 221, getWidth() - 32, 123);
startStopButton->setBounds (16, getHeight() - 46, 150, 32);
fileTreeComp->setBounds (16, 8, getWidth() - 32, getHeight() - 245);
- explanation->setBounds (256, getHeight() - 82, getWidth() - 275, 64);
- zoomSlider->setBounds (72, getHeight() - 90, 200, 24);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
+void AudioDemoPlaybackPage::sliderValueChanged (Slider* sliderThatWasMoved)
+{
+ //[UsersliderValueChanged_Pre]
+ //[/UsersliderValueChanged_Pre]
+
+ if (sliderThatWasMoved == zoomSlider)
+ {
+ //[UserSliderCode_zoomSlider] -- add your slider handling code here..
+ thumbnail->setZoomFactor (zoomSlider->getValue());
+ //[/UserSliderCode_zoomSlider]
+ }
+
+ //[UsersliderValueChanged_Post]
+ //[/UsersliderValueChanged_Post]
+}
+
void AudioDemoPlaybackPage::buttonClicked (Button* buttonThatWasClicked)
{
//[UserbuttonClicked_Pre]
@@ -304,22 +322,6 @@ void AudioDemoPlaybackPage::buttonClicked (Button* buttonThatWasClicked)
//[/UserbuttonClicked_Post]
}
-void AudioDemoPlaybackPage::sliderValueChanged (Slider* sliderThatWasMoved)
-{
- //[UsersliderValueChanged_Pre]
- //[/UsersliderValueChanged_Pre]
-
- if (sliderThatWasMoved == zoomSlider)
- {
- //[UserSliderCode_zoomSlider] -- add your slider handling code here..
- thumbnail->setZoomFactor (zoomSlider->getValue());
- //[/UserSliderCode_zoomSlider]
- }
-
- //[UsersliderValueChanged_Post]
- //[/UsersliderValueChanged_Post]
-}
-
//[MiscUserCode] You can add your own definitions of your custom methods or any other code here...
diff --git a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h
index 6a6810c234..8fec2e1235 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h
+++ b/extras/JuceDemo/Source/demos/AudioDemoPlaybackPage.h
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:08:14pm
+ Creation date: 20 Sep 2012 1:43:44pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -19,8 +19,8 @@
==============================================================================
*/
-#ifndef __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_81B4F279__
-#define __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_81B4F279__
+#ifndef __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_10A391BC__
+#define __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_10A391BC__
//[Headers] -- You can add your own extra header files here --
#include "../jucedemo_headers.h"
@@ -39,8 +39,8 @@ class DemoThumbnailComp;
*/
class AudioDemoPlaybackPage : public Component,
public FileBrowserListener,
- public ButtonListener,
- public SliderListener
+ public SliderListener,
+ public ButtonListener
{
public:
//==============================================================================
@@ -60,14 +60,11 @@ public:
void paint (Graphics& g);
void resized();
- void buttonClicked (Button* buttonThatWasClicked);
void sliderValueChanged (Slider* sliderThatWasMoved);
+ void buttonClicked (Button* buttonThatWasClicked);
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
AudioDeviceManager& deviceManager;
@@ -84,18 +81,16 @@ private:
//==============================================================================
Label* zoomLabel;
+ Label* explanation;
+ Slider* zoomSlider;
DemoThumbnailComp* thumbnail;
TextButton* startStopButton;
FileTreeComponent* fileTreeComp;
- Label* explanation;
- Slider* zoomSlider;
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- AudioDemoPlaybackPage (const AudioDemoPlaybackPage&);
- const AudioDemoPlaybackPage& operator= (const AudioDemoPlaybackPage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoPlaybackPage);
};
-#endif // __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_81B4F279__
+#endif // __JUCER_HEADER_AUDIODEMOPLAYBACKPAGE_AUDIODEMOPLAYBACKPAGE_10A391BC__
diff --git a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp
index 031cc8da1e..fa763f1ace 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp
+++ b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.cpp
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:08:25pm
+ Creation date: 20 Sep 2012 1:43:57pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
diff --git a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h
index 4ab42d9441..96ce3b92b5 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h
+++ b/extras/JuceDemo/Source/demos/AudioDemoRecordPage.h
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:08:25pm
+ Creation date: 20 Sep 2012 1:43:57pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -19,8 +19,8 @@
==============================================================================
*/
-#ifndef __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_E12E1947__
-#define __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_E12E1947__
+#ifndef __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_9CE2EC8__
+#define __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_9CE2EC8__
//[Headers] -- You can add your own extra header files here --
#include "../jucedemo_headers.h"
@@ -57,9 +57,6 @@ public:
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
AudioDeviceManager& deviceManager;
@@ -73,10 +70,8 @@ private:
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- AudioDemoRecordPage (const AudioDemoRecordPage&);
- const AudioDemoRecordPage& operator= (const AudioDemoRecordPage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoRecordPage);
};
-#endif // __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_E12E1947__
+#endif // __JUCER_HEADER_AUDIODEMORECORDPAGE_AUDIODEMORECORDPAGE_9CE2EC8__
diff --git a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp
index 18bfd52e8c..fae0e93b66 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp
+++ b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.cpp
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 1:54:18pm
+ Creation date: 20 Sep 2012 1:44:04pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
diff --git a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h
index ee651a2ee8..e81169bf4d 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h
+++ b/extras/JuceDemo/Source/demos/AudioDemoSetupPage.h
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 1:54:18pm
+ Creation date: 20 Sep 2012 1:44:04pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -19,8 +19,8 @@
==============================================================================
*/
-#ifndef __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_A3545895__
-#define __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_A3545895__
+#ifndef __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_31046283__
+#define __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_31046283__
//[Headers] -- You can add your own extra header files here --
#include "../jucedemo_headers.h"
@@ -52,9 +52,6 @@ public:
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
AudioDeviceManager& deviceManager;
@@ -65,10 +62,8 @@ private:
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- AudioDemoSetupPage (const AudioDemoSetupPage&);
- const AudioDemoSetupPage& operator= (const AudioDemoSetupPage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoSetupPage);
};
-#endif // __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_A3545895__
+#endif // __JUCER_HEADER_AUDIODEMOSETUPPAGE_AUDIODEMOSETUPPAGE_31046283__
diff --git a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp
index 8c2f3d0f4f..2ac538868b 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp
+++ b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.cpp
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:06:00pm
+ Creation date: 20 Sep 2012 1:44:13pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
diff --git a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h
index a6bf5cf9df..2f95cf0819 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h
+++ b/extras/JuceDemo/Source/demos/AudioDemoSynthPage.h
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:06:00pm
+ Creation date: 20 Sep 2012 1:44:13pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -19,8 +19,8 @@
==============================================================================
*/
-#ifndef __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_1E55DCCB__
-#define __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_1E55DCCB__
+#ifndef __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_B0883FF1__
+#define __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_B0883FF1__
//[Headers] -- You can add your own extra header files here --
#include "../jucedemo_headers.h"
@@ -56,9 +56,6 @@ public:
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
AudioDeviceManager& deviceManager;
@@ -75,10 +72,8 @@ private:
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- AudioDemoSynthPage (const AudioDemoSynthPage&);
- const AudioDemoSynthPage& operator= (const AudioDemoSynthPage&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoSynthPage);
};
-#endif // __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_1E55DCCB__
+#endif // __JUCER_HEADER_AUDIODEMOSYNTHPAGE_AUDIODEMOSYNTHPAGE_B0883FF1__
diff --git a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp
index 09ea5b0cdb..4974d967e1 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp
+++ b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.cpp
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:07:35pm
+ Creation date: 20 Sep 2012 1:44:23pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
diff --git a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h
index e2c3fba3ec..4fc86f630b 100644
--- a/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h
+++ b/extras/JuceDemo/Source/demos/AudioDemoTabComponent.h
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:07:35pm
+ Creation date: 20 Sep 2012 1:44:23pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -19,8 +19,8 @@
==============================================================================
*/
-#ifndef __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_ADE99E0E__
-#define __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_ADE99E0E__
+#ifndef __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_E13E3004__
+#define __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_E13E3004__
//[Headers] -- You can add your own extra header files here --
#include "../jucedemo_headers.h"
@@ -82,9 +82,6 @@ public:
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
AudioDeviceManager deviceManager;
@@ -95,10 +92,8 @@ private:
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- AudioDemoTabComponent (const AudioDemoTabComponent&);
- const AudioDemoTabComponent& operator= (const AudioDemoTabComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoTabComponent);
};
-#endif // __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_ADE99E0E__
+#endif // __JUCER_HEADER_AUDIODEMOTABCOMPONENT_AUDIODEMOTABCOMPONENT_E13E3004__
diff --git a/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp b/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp
index cadef5df2f..91050ed399 100644
--- a/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp
+++ b/extras/JuceDemo/Source/demos/RenderingTestComponent.cpp
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:07:57pm
+ Creation date: 20 Sep 2012 1:44:35pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -43,8 +43,7 @@ public:
glyphs.addFittedText (Font (20.0f), "The Quick Brown Fox Jumped Over The Lazy Dog",
-120, -50, 240, 100, Justification::centred, 2, 1.0f);
- int i;
- for (i = 0; i < numElementsInArray (bouncingPointX); ++i)
+ for (int i = 0; i < numElementsInArray (bouncingPointX); ++i)
{
bouncingPointX[i] = (float) Random::getSystemRandom().nextInt (200);
bouncingPointY[i] = (float) Random::getSystemRandom().nextInt (200);
@@ -52,13 +51,13 @@ public:
bouncingPointDY[i] = (Random::getSystemRandom().nextFloat() - 0.5f) * 6.0f;
}
- for (i = 0; i < numElementsInArray (bouncingNumber); ++i)
+ for (int i = 0; i < numElementsInArray (bouncingNumber); ++i)
{
bouncingNumber[i] = Random::getSystemRandom().nextFloat();
bouncingNumberDelta[i] = (Random::getSystemRandom().nextFloat() - 0.5f) * 0.03f;
}
- for (i = 0; i < numElementsInArray (speeds); ++i)
+ for (int i = 0; i < numElementsInArray (speeds); ++i)
speeds[i] = 0.02f;
int redrawFramesPerSecond = 60;
@@ -109,14 +108,13 @@ public:
{
repaint();
- int i;
- for (i = 0; i < numElementsInArray (bouncingPointX); ++i)
+ for (int i = 0; i < numElementsInArray (bouncingPointX); ++i)
{
bounce (bouncingPointX[i], bouncingPointDX[i], (float) getWidth());
bounce (bouncingPointY[i], bouncingPointDY[i], (float) getHeight());
}
- for (i = 0; i < numElementsInArray (bouncingNumber); ++i)
+ for (int i = 0; i < numElementsInArray (bouncingNumber); ++i)
bounce (bouncingNumber[i], bouncingNumberDelta[i], 1.0f);
owner.speedLabel->setText (String (getWidth()) + "x" + String (getHeight())
@@ -591,28 +589,28 @@ void RenderingTestComponent::paint (Graphics& g)
void RenderingTestComponent::resized()
{
- testTypeComboBox->setBounds (proportionOfWidth (0.1647f), 16, proportionOfWidth (0.3426f), 24);
- testTypeLabel->setBounds (proportionOfWidth (0.0277f), 16, proportionOfWidth (0.1291f), 24);
- speedLabel->setBounds (proportionOfWidth (0.5375f), 16, proportionOfWidth (0.4308f), 24);
+ testTypeComboBox->setBounds (proportionOfWidth (0.1652f), 16, proportionOfWidth (0.3429f), 24);
+ testTypeLabel->setBounds (proportionOfWidth (0.0269f), 16, proportionOfWidth (0.1293f), 24);
+ speedLabel->setBounds (proportionOfWidth (0.5368f), 16, proportionOfWidth (0.4309f), 24);
testCanvas->setBounds (20, 56, getWidth() - 40, getHeight() - 215);
- opacitySlider->setBounds (proportionOfWidth (0.5995f), getHeight() - 141, proportionOfWidth (0.3781f), 24);
- highQualityToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 141, proportionOfWidth (0.4453f), 24);
- animateSizeToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 85, proportionOfWidth (0.2240f), 24);
- animateRotationToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 61, proportionOfWidth (0.2240f), 24);
- animatePositionToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 109, proportionOfWidth (0.2240f), 24);
- animateFillToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 37, proportionOfWidth (0.2345f), 24);
- opacityLabel->setBounds ((proportionOfWidth (0.5995f)) + -66, getHeight() - 141, 64, 24);
- xSlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 109, proportionOfWidth (0.3781f), 24);
- ySlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 85, proportionOfWidth (0.3781f), 24);
- sizeSlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 61, proportionOfWidth (0.3781f), 24);
- angleSlider->setBounds (proportionOfWidth (0.3610f), getHeight() - 37, proportionOfWidth (0.3781f), 24);
- xSliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 109, proportionOfWidth (0.1067f), 24);
- ySliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 85, proportionOfWidth (0.1067f), 24);
- sizeSliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 61, proportionOfWidth (0.1067f), 24);
- angleSliderLabel->setBounds (proportionOfWidth (0.2490f), getHeight() - 37, proportionOfWidth (0.1067f), 24);
- clipToRectangleToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 109, 144, 24);
- clipToPathToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 85, 144, 24);
- clipToImageToggle->setBounds (proportionOfWidth (0.0224f), getHeight() - 61, 144, 24);
+ opacitySlider->setBounds (proportionOfWidth (0.5996f), getHeight() - 141, proportionOfWidth (0.3788f), 24);
+ highQualityToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 141, proportionOfWidth (0.4452f), 24);
+ animateSizeToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 85, proportionOfWidth (0.2244f), 24);
+ animateRotationToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 61, proportionOfWidth (0.2244f), 24);
+ animatePositionToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 109, proportionOfWidth (0.2244f), 24);
+ animateFillToggle->setBounds (proportionOfWidth (0.7576f), getHeight() - 37, proportionOfWidth (0.2352f), 24);
+ opacityLabel->setBounds ((proportionOfWidth (0.5996f)) + -66, getHeight() - 141, 64, 24);
+ xSlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 109, proportionOfWidth (0.3788f), 24);
+ ySlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 85, proportionOfWidth (0.3788f), 24);
+ sizeSlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 61, proportionOfWidth (0.3788f), 24);
+ angleSlider->setBounds (proportionOfWidth (0.3609f), getHeight() - 37, proportionOfWidth (0.3788f), 24);
+ xSliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 109, proportionOfWidth (0.1059f), 24);
+ ySliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 85, proportionOfWidth (0.1059f), 24);
+ sizeSliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 61, proportionOfWidth (0.1059f), 24);
+ angleSliderLabel->setBounds (proportionOfWidth (0.2495f), getHeight() - 37, proportionOfWidth (0.1059f), 24);
+ clipToRectangleToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 109, 144, 24);
+ clipToPathToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 85, 144, 24);
+ clipToImageToggle->setBounds (proportionOfWidth (0.0215f), getHeight() - 61, 144, 24);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
@@ -687,16 +685,16 @@ BEGIN_JUCER_METADATA
fixedSize="0" initialWidth="600" initialHeight="400">
@@ -704,27 +702,27 @@ BEGIN_JUCER_METADATA
explicitFocusOrder="0" pos="20 56 40M 215M" class="RenderingTestCanvas"
params="*this"/>
diff --git a/extras/JuceDemo/Source/demos/RenderingTestComponent.h b/extras/JuceDemo/Source/demos/RenderingTestComponent.h
index a056120ac4..b21ff5d51e 100644
--- a/extras/JuceDemo/Source/demos/RenderingTestComponent.h
+++ b/extras/JuceDemo/Source/demos/RenderingTestComponent.h
@@ -3,7 +3,7 @@
This is an automatically generated file created by the Jucer!
- Creation date: 1 May 2011 12:07:57pm
+ Creation date: 20 Sep 2012 1:44:35pm
Be careful when adding custom code to these files, as only the code within
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
@@ -19,8 +19,8 @@
==============================================================================
*/
-#ifndef __JUCER_HEADER_RENDERINGTESTCOMPONENT_RENDERINGTESTCOMPONENT_ABDF1DF__
-#define __JUCER_HEADER_RENDERINGTESTCOMPONENT_RENDERINGTESTCOMPONENT_ABDF1DF__
+#ifndef __JUCER_HEADER_RENDERINGTESTCOMPONENT_RENDERINGTESTCOMPONENT_51E39D0E__
+#define __JUCER_HEADER_RENDERINGTESTCOMPONENT_RENDERINGTESTCOMPONENT_51E39D0E__
//[Headers] -- You can add your own extra header files here --
#include "../jucedemo_headers.h"
@@ -62,9 +62,6 @@ public:
static const int demoPng_pngSize;
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
friend class RenderingTestCanvas;
@@ -96,10 +93,8 @@ private:
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- RenderingTestComponent (const RenderingTestComponent&);
- const RenderingTestComponent& operator= (const RenderingTestComponent&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (RenderingTestComponent);
};
-#endif // __JUCER_HEADER_RENDERINGTESTCOMPONENT_RENDERINGTESTCOMPONENT_ABDF1DF__
+#endif // __JUCER_HEADER_RENDERINGTESTCOMPONENT_RENDERINGTESTCOMPONENT_51E39D0E__
diff --git a/extras/the jucer/src/templates/jucer_ComponentTemplate.h b/extras/the jucer/src/templates/jucer_ComponentTemplate.h
index 210d2372b0..6ff540245b 100644
--- a/extras/the jucer/src/templates/jucer_ComponentTemplate.h
+++ b/extras/the jucer/src/templates/jucer_ComponentTemplate.h
@@ -49,9 +49,6 @@ public:
%%publicMemberDeclarations%%
- //==============================================================================
- juce_UseDebuggingNewOperator
-
private:
//[UserVariables] -- You can add your own custom variables in this section.
//[/UserVariables]
@@ -60,9 +57,7 @@ private:
%%privateMemberDeclarations%%
//==============================================================================
- // (prevent copy constructor and operator= being generated..)
- %%className%% (const %%className%%&);
- const %%className%%& operator= (const %%className%%&);
+ JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (%%className%%);
};
diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
index d1b242691b..16a689f440 100644
--- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
+++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp
@@ -152,9 +152,7 @@ String AudioDeviceManager::initialise (const int numInputChannelsNeeded,
if (findType (currentDeviceType) == nullptr)
{
- AudioIODeviceType* const type = findType (setup.inputDeviceName, setup.outputDeviceName);
-
- if (type != nullptr)
+ if (AudioIODeviceType* const type = findType (setup.inputDeviceName, setup.outputDeviceName))
currentDeviceType = type->getTypeName();
else if (availableDeviceTypes.size() > 0)
currentDeviceType = availableDeviceTypes.getUnchecked(0)->getTypeName();
@@ -233,8 +231,7 @@ String AudioDeviceManager::initialise (const int numInputChannelsNeeded,
void AudioDeviceManager::insertDefaultDeviceNames (AudioDeviceSetup& setup) const
{
- AudioIODeviceType* type = getCurrentDeviceTypeObject();
- if (type != nullptr)
+ if (AudioIODeviceType* type = getCurrentDeviceTypeObject())
{
if (setup.outputDeviceName.isEmpty())
setup.outputDeviceName = type->getDeviceNames (false) [type->getDefaultDeviceIndex (false)];
diff --git a/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp b/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp
index 847abc2b80..0a4c1df530 100644
--- a/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp
+++ b/modules/juce_audio_formats/format/juce_AudioFormatManager.cpp
@@ -142,17 +142,9 @@ AudioFormatReader* AudioFormatManager::createReaderFor (const File& file)
AudioFormat* const af = getKnownFormat(i);
if (af->canHandleFile (file))
- {
- InputStream* const in = file.createInputStream();
-
- if (in != nullptr)
- {
- AudioFormatReader* const r = af->createReaderFor (in, true);
-
- if (r != nullptr)
+ if (InputStream* const in = file.createInputStream())
+ if (AudioFormatReader* const r = af->createReaderFor (in, true))
return r;
- }
- }
}
return nullptr;
@@ -172,9 +164,7 @@ AudioFormatReader* AudioFormatManager::createReaderFor (InputStream* audioFileSt
for (int i = 0; i < getNumKnownFormats(); ++i)
{
- AudioFormatReader* const r = getKnownFormat(i)->createReaderFor (in, false);
-
- if (r != nullptr)
+ if (AudioFormatReader* const r = getKnownFormat(i)->createReaderFor (in, false))
{
in.release();
return r;
diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp
index 574d66ccf7..879a51d34c 100644
--- a/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp
+++ b/modules/juce_audio_formats/format/juce_AudioFormatReaderSource.cpp
@@ -23,9 +23,9 @@
==============================================================================
*/
-AudioFormatReaderSource::AudioFormatReaderSource (AudioFormatReader* const reader_,
+AudioFormatReaderSource::AudioFormatReaderSource (AudioFormatReader* const r,
const bool deleteReaderWhenThisIsDeleted)
- : reader (reader_, deleteReaderWhenThisIsDeleted),
+ : reader (r, deleteReaderWhenThisIsDeleted),
nextPlayPos (0),
looping (false)
{
diff --git a/modules/juce_gui_basics/application/juce_Application.cpp b/modules/juce_gui_basics/application/juce_Application.cpp
index cf6e531284..a04cf021a0 100644
--- a/modules/juce_gui_basics/application/juce_Application.cpp
+++ b/modules/juce_gui_basics/application/juce_Application.cpp
@@ -56,9 +56,7 @@ public:
void actionListenerCallback (const String& message)
{
- JUCEApplication* const app = JUCEApplication::getInstance();
-
- if (app != nullptr)
+ if (JUCEApplication* const app = JUCEApplication::getInstance())
{
const String appName (app->getApplicationName());