1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Formatting

This commit is contained in:
Tom Poole 2023-09-29 16:41:53 +01:00
parent ff0cb4ad5b
commit 4153d59e39
279 changed files with 1281 additions and 1281 deletions

View file

@ -96,7 +96,7 @@ struct IIRFilterDemoDSP
ChoiceParameter typeParam { { "Low-pass", "High-pass", "Band-pass" }, 1, "Type" };
SliderParameter cutoffParam { { 20.0, 20000.0 }, 0.5, 440.0f, "Cutoff", "Hz" };
SliderParameter qParam { { 0.3, 20.0 }, 0.5, 1.0 / std::sqrt(2.0), "Q" };
SliderParameter qParam { { 0.3, 20.0 }, 0.5, 1.0 / std::sqrt (2.0), "Q" };
std::vector<DSPDemoParameterBase*> parameters { &typeParam, &cutoffParam, &qParam };
double sampleRate = 0.0;

View file

@ -99,8 +99,8 @@ public:
private:
//==============================================================================
Label helloWorldLabel { {}, TRANS("Hello World!") };
TextButton quitButton { TRANS("Quit") };
Label helloWorldLabel { {}, TRANS ("Hello World!") };
TextButton quitButton { TRANS ("Quit") };
Path internalPath;
//==============================================================================

View file

@ -1281,7 +1281,7 @@ private:
shader.reset (newShader.release());
shader->use();
shape .reset (new OpenGLUtils::Shape ());
shape .reset (new OpenGLUtils::Shape());
attributes.reset (new OpenGLUtils::Attributes (*shader));
uniforms .reset (new OpenGLUtils::Uniforms (*shader));

View file

@ -543,7 +543,7 @@ private:
curVideoComp->onPlaybackStarted = [this]() { processPlaybackStarted(); };
curVideoComp->onPlaybackStopped = [this]() { processPlaybackPaused(); };
curVideoComp->onErrorOccurred = [this](const String& errorMessage) { errorOccurred (errorMessage); };
curVideoComp->onErrorOccurred = [this] (const String& errorMessage) { errorOccurred (errorMessage); };
curVideoComp->setVisible (true);
#if JUCE_SYNC_VIDEO_VOLUME_WITH_OS_MEDIA_VOLUME

View file

@ -229,7 +229,7 @@ struct SlidersPage final : public Component
for (int i = 8; i <= 11; ++i)
{
auto* selectedSlider = sliders.getUnchecked(i);
auto* selectedSlider = sliders.getUnchecked (i);
selectedSlider->setTextBoxStyle (Slider::NoTextBox, false, 0, 0);
selectedSlider->getMaxValueObject().referTo (sharedValueMax);
selectedSlider->getMinValueObject().referTo (sharedValueMin);
@ -1133,7 +1133,7 @@ public:
String getText (const int columnNumber, const int rowNumber) const
{
return dataList->getChildElement (rowNumber)->getStringAttribute ( getAttributeNameForColumnId(columnNumber));
return dataList->getChildElement (rowNumber)->getStringAttribute (getAttributeNameForColumnId (columnNumber));
}
void setText (const int columnNumber, const int rowNumber, const String& newText)
@ -1188,7 +1188,7 @@ private:
{
row = newRow;
columnId = newColumn;
setText (owner.getText(columnId, row), dontSendNotification);
setText (owner.getText (columnId, row), dontSendNotification);
}
void paint (Graphics& g) override

View file

@ -1103,7 +1103,7 @@ public:
const int x = timeToViewScaling.getXForTime (tempoConverter.getTimeForQuarter (quarterPos));
const auto barSignature = barSignaturesConverter.getBarSignatureForQuarter (quarterPos);
const int lineWidth = (approximatelyEqual (quarterPos, barSignature.position)) ? heavyLineWidth : lightLineWidth;
const int beatsSinceBarStart = roundToInt( barSignaturesConverter.getBeatDistanceFromBarStartForQuarter (quarterPos));
const int beatsSinceBarStart = roundToInt (barSignaturesConverter.getBeatDistanceFromBarStartForQuarter (quarterPos));
const int lineHeight = (beatsSinceBarStart == 0) ? rulerHeight : rulerHeight / 2;
rects.addWithoutMerging (Rectangle<int> (x - lineWidth / 2, 2 * rulerHeight - lineHeight, lineWidth, lineHeight));
}
@ -2196,7 +2196,7 @@ private:
void addTrackViews (ARARegionSequence* regionSequence)
{
const auto insertIntoMap = [](auto& map, auto key, auto value) -> auto&
const auto insertIntoMap = [] (auto& map, auto key, auto value) -> auto&
{
auto it = map.insert ({ std::move (key), std::move (value) });
return *(it.first->second);

View file

@ -111,7 +111,7 @@ public:
ignoreUnused (style, minSliderPos, maxSliderPos);
auto r = Rectangle<int> (x + haloRadius, y, width - (haloRadius * 2), height);
auto backgroundBar = r.withSizeKeepingCentre(r.getWidth(), 2);
auto backgroundBar = r.withSizeKeepingCentre (r.getWidth(), 2);
sliderPos = (sliderPos - minSliderPos) / static_cast<float> (width);
@ -312,7 +312,7 @@ private:
class AUv3SynthProcessor final : public AudioProcessor
{
public:
AUv3SynthProcessor ()
AUv3SynthProcessor()
: AudioProcessor (BusesProperties().withOutput ("Output", AudioChannelSet::stereo(), true)),
currentRecording (1, 1), currentProgram (0)
{

View file

@ -2358,7 +2358,7 @@ public:
// These accessors are just for an 'overview' and won't give the exact
// state of the audio engine at a particular point in time.
// If you call getNumVoices(), get the result '10', and then call
// getPlaybackPosiiton(9), there's a chance the audio engine will have
// getPlaybackPosiiton (9), there's a chance the audio engine will have
// been updated to remove some voices in the meantime, so the returned
// value won't correspond to an existing voice.
int getNumVoices() const { return synthesiser.getNumVoices(); }

View file

@ -104,7 +104,7 @@ public:
int statusCode = 0;
if (auto stream = url.createInputStream (URL::InputStreamOptions (URL::ParameterHandling::inAddress)
.withConnectionTimeoutMs(10000)
.withConnectionTimeoutMs (10000)
.withResponseHeaders (&responseHeaders)
.withStatusCode (&statusCode)))
{

View file

@ -152,13 +152,13 @@ public:
typeAsString = "(unknown)";
}
oscLogList.add (getIndentationString (level + 1) + "- " + typeAsString.paddedRight(' ', 12) + valueAsString);
oscLogList.add (getIndentationString (level + 1) + "- " + typeAsString.paddedRight (' ', 12) + valueAsString);
}
//==============================================================================
void addInvalidOSCPacket (const char* /* data */, int dataSize)
{
oscLogList.add ("- (" + String(dataSize) + "bytes with invalid format)");
oscLogList.add ("- (" + String (dataSize) + "bytes with invalid format)");
}
//==============================================================================

View file

@ -111,8 +111,8 @@ public class JuceActivity extends Activity
@Override
protected void onNewIntent (Intent intent)
{
super.onNewIntent(intent);
setIntent(intent);
super.onNewIntent (intent);
setIntent (intent);
appNewIntent (intent);
}
@ -1191,7 +1191,7 @@ private:
void resized()
{
auto rowSize = getHeight () / 10;
auto rowSize = getHeight() / 10;
auto bounds = getLocalBounds().reduced (getWidth() / 10, getHeight() / 10);

View file

@ -292,7 +292,7 @@ public:
auto area = getLocalBounds();
typeBox.setBounds (area.removeFromTop (36).removeFromRight (150).reduced (8));
codeDocumentComponent.setBounds (area.removeFromTop(area.getHeight() / 2).reduced (8));
codeDocumentComponent.setBounds (area.removeFromTop (area.getHeight() / 2).reduced (8));
resultsTree .setBounds (area.reduced (8));
errorMessage .setBounds (resultsTree.getBounds());
}