From 4153d59e39868ced67decb4c288eba900d0f59bb Mon Sep 17 00:00:00 2001 From: Tom Poole Date: Fri, 29 Sep 2023 16:41:53 +0100 Subject: [PATCH] Formatting --- examples/DSP/IIRFilterDemo.h | 2 +- examples/GUI/HelloWorldDemo.h | 4 +- examples/GUI/OpenGLDemo.h | 2 +- examples/GUI/VideoDemo.h | 2 +- examples/GUI/WidgetsDemo.h | 6 +- examples/Plugins/ARAPluginDemo.h | 4 +- examples/Plugins/AUv3SynthPluginDemo.h | 4 +- examples/Plugins/SamplerPluginDemo.h | 2 +- examples/Utilities/NetworkingDemo.h | 2 +- examples/Utilities/OSCDemo.h | 4 +- examples/Utilities/PushNotificationsDemo.h | 6 +- examples/Utilities/XMLandJSONDemo.h | 2 +- extras/AudioPluginHost/Source/HostStartup.cpp | 2 +- .../Source/Plugins/IOConfigurationWindow.cpp | 2 +- .../Source/Plugins/PluginGraph.cpp | 2 +- .../Source/UI/GraphEditorPanel.cpp | 6 +- .../Source/UI/MainHostWindow.cpp | 4 +- .../AudioPluginHost/Source/UI/PluginWindow.h | 2 +- .../utils/juce_BinaryResourceFile.cpp | 4 +- .../utils/juce_BinaryResourceFile.h | 2 +- .../juce_build_tools/utils/juce_ProjectType.h | 6 +- extras/NetworkGraphicsDemo/Source/Demos.h | 6 +- .../Source/MasterComponent.h | 2 +- .../NetworkGraphicsDemo/Source/SharedCanvas.h | 6 +- .../jucer_TranslationToolWindowComponent.h | 4 +- .../Source/Application/jucer_Application.cpp | 6 +- .../Source/Application/jucer_CommandLine.cpp | 8 +- .../Source/Application/jucer_MainWindow.cpp | 10 +- .../CodeEditor/jucer_OpenDocumentManager.cpp | 18 +- .../CodeEditor/jucer_SourceCodeEditor.cpp | 4 +- .../PaintElements/jucer_FillType.h | 2 +- .../jucer_ImageResourceProperty.h | 4 +- .../PaintElements/jucer_PaintElement.cpp | 4 +- .../PaintElements/jucer_PaintElementGroup.cpp | 18 +- .../PaintElements/jucer_PaintElementPath.cpp | 18 +- .../jucer_PaintElementUndoableAction.h | 2 +- .../Properties/jucer_FontPropertyComponent.h | 2 +- .../UI/jucer_ComponentLayoutEditor.cpp | 4 +- .../UI/jucer_EditingPanelBase.cpp | 2 +- .../UI/jucer_JucerDocumentEditor.cpp | 34 +-- .../UI/jucer_TestComponent.cpp | 2 +- .../ComponentEditor/jucer_ComponentLayout.cpp | 14 +- .../ComponentEditor/jucer_GeneratedCode.cpp | 12 +- .../ComponentEditor/jucer_PaintRoutine.cpp | 4 +- .../ComponentEditor/jucer_UtilityFunctions.h | 2 +- .../Modules/jucer_AvailableModulesList.h | 2 +- .../Source/Project/Modules/jucer_Modules.cpp | 2 +- .../Project/UI/Sidebar/jucer_FileTreeItems.h | 22 +- .../Projucer/Source/Project/jucer_Project.cpp | 22 +- .../jucer_ProjectExport_Android.h | 8 +- .../jucer_ProjectExport_CodeBlocks.h | 4 +- .../ProjectSaving/jucer_ResourceFile.cpp | 2 +- .../Settings/jucer_AppearanceSettings.cpp | 6 +- .../Source/Settings/jucer_StoredSettings.cpp | 8 +- .../Utility/Helpers/jucer_CodeHelpers.cpp | 4 +- .../Source/Utility/Helpers/jucer_Colours.h | 274 +++++++++--------- .../Utility/Helpers/jucer_MiscUtilities.h | 2 +- .../Utility/Helpers/jucer_NewFileWizard.cpp | 2 +- .../Helpers/jucer_TranslationHelpers.h | 8 +- .../Utility/UI/jucer_ProjucerLookAndFeel.cpp | 2 +- .../UI/jucer_SlidingPanelComponent.cpp | 4 +- .../buffers/juce_AudioChannelSet.cpp | 202 ++++++------- .../juce_audio_basics/midi/juce_MidiFile.cpp | 6 +- .../midi/juce_MidiMessage.cpp | 142 ++++----- .../midi/juce_MidiMessageSequence.cpp | 20 +- .../juce_audio_basics/midi/ump/juce_UMPView.h | 2 +- .../juce_ChannelRemappingAudioSource.cpp | 4 +- .../sources/juce_IIRFilterAudioSource.cpp | 8 +- .../sources/juce_MixerAudioSource.cpp | 12 +- .../utilities/juce_IIRFilter.cpp | 2 +- .../audio_io/juce_AudioDeviceManager.cpp | 34 +-- .../native/juce_ALSA_linux.cpp | 2 +- .../native/juce_ASIO_windows.cpp | 10 +- .../native/juce_Audio_android.cpp | 16 +- .../native/juce_Audio_ios.cpp | 14 +- .../native/juce_CoreAudio_mac.cpp | 4 +- .../native/juce_DirectSound_windows.cpp | 168 +++++------ .../native/juce_JackAudio_linux.cpp | 4 +- .../native/juce_Midi_android.cpp | 2 +- .../native/juce_Midi_windows.cpp | 2 +- .../native/juce_Oboe_android.cpp | 2 +- .../native/juce_OpenSL_android.cpp | 10 +- .../native/juce_WASAPI_windows.cpp | 14 +- .../codecs/juce_AiffAudioFormat.h | 2 +- .../codecs/juce_CoreAudioFormat.cpp | 2 +- .../format/juce_AudioFormatWriter.cpp | 2 +- .../AU/AudioUnitSDK/AUBufferAllocator.cpp | 2 +- .../AU/AudioUnitSDK/ComponentBase.cpp | 2 +- .../Standalone/juce_StandaloneFilterWindow.h | 14 +- .../Unity/juce_UnityPluginInterface.h | 4 +- .../juce_audio_plugin_client_AAX.cpp | 2 +- .../juce_audio_plugin_client_AAX_utils.cpp | 2 +- .../juce_audio_plugin_client_AU_1.mm | 14 +- .../juce_audio_plugin_client_AUv3.mm | 22 +- .../juce_audio_plugin_client_Standalone.cpp | 2 +- .../juce_audio_plugin_client_VST2.cpp | 10 +- .../juce_audio_plugin_client_VST3.cpp | 14 +- .../format_types/juce_ARAHosting.cpp | 2 +- .../juce_AudioUnitPluginFormat.mm | 16 +- .../format_types/juce_LADSPAPluginFormat.cpp | 6 +- .../format_types/juce_LV2PluginFormat.cpp | 10 +- .../format_types/juce_VST3PluginFormat.cpp | 12 +- .../format_types/juce_VSTCommon.h | 2 +- .../format_types/juce_VSTPluginFormat.cpp | 24 +- .../processors/juce_AudioPluginInstance.cpp | 2 +- .../processors/juce_AudioProcessor.cpp | 8 +- .../processors/juce_AudioProcessorGraph.h | 2 +- .../processors/juce_AudioProcessorParameter.h | 2 +- .../scanning/juce_KnownPluginList.cpp | 2 +- .../utilities/ARA/juce_ARAModelObjects.h | 2 +- .../utilities/ARA/juce_ARA_utils.cpp | 2 +- .../utilities/juce_AudioParameterBool.cpp | 2 +- .../juce_AudioProcessorParameterWithID.h | 4 +- .../audio_cd/juce_AudioCDReader.cpp | 2 +- .../gui/juce_AudioDeviceSelectorComponent.cpp | 2 +- .../gui/juce_AudioThumbnail.cpp | 6 +- .../gui/juce_AudioThumbnailCache.cpp | 10 +- .../gui/juce_AudioVisualiserComponent.cpp | 6 +- .../gui/juce_MidiKeyboardComponent.cpp | 2 +- .../native/juce_AudioCDReader_mac.mm | 4 +- .../juce_core/containers/juce_ArrayBase.cpp | 2 +- modules/juce_core/containers/juce_ArrayBase.h | 2 +- modules/juce_core/containers/juce_HashMap.h | 8 +- .../juce_core/containers/juce_ListenerList.h | 8 +- .../containers/juce_NamedValueSet.cpp | 12 +- modules/juce_core/containers/juce_SparseSet.h | 2 +- modules/juce_core/files/juce_File.cpp | 2 +- modules/juce_core/javascript/juce_JSON.cpp | 2 +- .../javascript/juce_JSONSerialisation.h | 2 +- .../juce_core/javascript/juce_Javascript.cpp | 12 +- modules/juce_core/maths/juce_BigInteger.cpp | 8 +- modules/juce_core/maths/juce_Expression.cpp | 10 +- modules/juce_core/maths/juce_MathsFunctions.h | 6 +- .../maths/juce_MathsFunctions_test.cpp | 8 +- .../memory/juce_LeakedObjectDetector.h | 2 +- .../memory/juce_SharedResourcePointer.h | 2 +- modules/juce_core/memory/juce_Singleton.h | 4 +- .../misc/juce_ConsoleApplication.cpp | 4 +- .../native/juce_AndroidDocument_android.cpp | 2 +- .../juce_core/native/juce_Files_windows.cpp | 2 +- .../native/juce_JNIHelpers_android.cpp | 8 +- .../juce_core/native/juce_Network_curl.cpp | 2 +- .../juce_core/native/juce_Network_linux.cpp | 6 +- .../juce_core/native/juce_Network_windows.cpp | 4 +- .../juce_RuntimePermissions_android.cpp | 6 +- .../native/juce_SystemStats_android.cpp | 2 +- .../native/juce_SystemStats_windows.cpp | 4 +- .../juce_core/native/juce_Threads_android.cpp | 2 +- modules/juce_core/native/juce_Threads_mac.mm | 2 +- .../juce_core/native/juce_Threads_windows.cpp | 2 +- modules/juce_core/network/juce_Socket.h | 4 +- modules/juce_core/network/juce_URL.cpp | 6 +- .../juce_core/network/juce_WebInputStream.cpp | 2 +- .../juce_core/streams/juce_URLInputSource.cpp | 2 +- .../juce_core/system/juce_CompilerWarnings.h | 4 +- modules/juce_core/system/juce_PlatformDefs.h | 8 +- .../juce_core/system/juce_StandardHeader.h | 2 +- modules/juce_core/system/juce_SystemStats.cpp | 6 +- .../juce_core/text/juce_LocalisedStrings.h | 4 +- modules/juce_core/text/juce_String.cpp | 16 +- modules/juce_core/text/juce_String.h | 2 +- modules/juce_core/text/juce_StringArray.cpp | 14 +- modules/juce_core/text/juce_StringPool.cpp | 2 +- .../threads/juce_HighResolutionTimer.cpp | 12 +- modules/juce_core/threads/juce_Thread.cpp | 4 +- modules/juce_core/threads/juce_ThreadPool.cpp | 2 +- modules/juce_core/time/juce_RelativeTime.cpp | 14 +- modules/juce_core/xml/juce_XmlElement.h | 8 +- .../encryption/juce_BlowFish.cpp | 14 +- .../juce_cryptography/hashing/juce_MD5.cpp | 2 +- .../undomanager/juce_UndoManager.cpp | 2 +- .../values/juce_ValueTreeSynchroniser.cpp | 2 +- .../containers/juce_SIMDRegister_test.cpp | 8 +- .../filter_design/juce_FilterDesign.cpp | 2 +- modules/juce_dsp/frequency/juce_FFT.cpp | 4 +- modules/juce_dsp/frequency/juce_FFT_test.cpp | 6 +- modules/juce_dsp/juce_dsp.h | 8 +- modules/juce_dsp/maths/juce_Matrix.cpp | 6 +- modules/juce_dsp/maths/juce_Matrix_test.cpp | 6 +- modules/juce_dsp/maths/juce_Polynomial.h | 2 +- .../native/juce_SIMDNativeOps_avx.cpp | 2 +- .../juce_dsp/native/juce_SIMDNativeOps_avx.h | 8 +- .../native/juce_SIMDNativeOps_neon.cpp | 2 +- .../juce_dsp/native/juce_SIMDNativeOps_neon.h | 8 +- .../native/juce_SIMDNativeOps_sse.cpp | 4 +- .../juce_dsp/native/juce_SIMDNativeOps_sse.h | 48 +-- .../juce_dsp/processors/juce_DelayLine.cpp | 2 +- .../juce_dsp/processors/juce_IIRFilter.cpp | 2 +- .../juce_dsp/processors/juce_Oversampling.cpp | 4 +- .../juce_dsp/processors/juce_ProcessorChain.h | 2 +- .../processors/juce_StateVariableFilter.h | 2 +- .../processors/juce_StateVariableTPTFilter.h | 2 +- modules/juce_dsp/widgets/juce_Chorus.h | 2 +- modules/juce_dsp/widgets/juce_Phaser.h | 2 +- .../broadcasters/juce_ActionBroadcaster.cpp | 2 +- .../messages/juce_ApplicationBase.cpp | 8 +- .../messages/juce_DeletedAtShutdown.cpp | 2 +- .../juce_events/timers/juce_MultiTimer.cpp | 2 +- .../colour/juce_ColourGradient.cpp | 8 +- modules/juce_graphics/fonts/juce_Font.cpp | 4 +- .../fonts/juce_GlyphArrangement.cpp | 8 +- .../image_formats/juce_PNGLoader.cpp | 2 +- .../juce_graphics/images/juce_ImageCache.cpp | 4 +- .../juce_Direct2DGraphicsContext_windows.cpp | 4 +- .../juce_DirectWriteTypeLayout_windows.cpp | 2 +- .../native/juce_Fonts_android.cpp | 40 +-- .../native/juce_GraphicsContext_android.cpp | 4 +- .../native/juce_IconHelpers_mac.cpp | 4 +- .../application/juce_Application.cpp | 4 +- .../juce_gui_basics/buttons/juce_Button.cpp | 2 +- .../buttons/juce_ShapeButton.cpp | 2 +- .../juce_ApplicationCommandManager.cpp | 12 +- .../commands/juce_ApplicationCommandManager.h | 2 +- .../commands/juce_KeyPressMappingSet.cpp | 32 +- .../components/juce_Component.cpp | 4 +- .../juce_gui_basics/desktop/juce_Desktop.cpp | 4 +- .../detail/juce_ComponentHelpers.h | 2 +- .../juce_DirectoryContentsList.cpp | 4 +- .../filebrowser/juce_FileBrowserComponent.cpp | 34 +-- .../filebrowser/juce_FileChooserDialogBox.cpp | 12 +- .../juce_FileSearchPathListComponent.cpp | 4 +- .../layout/juce_ComponentAnimator.cpp | 6 +- .../layout/juce_ComponentBuilder.cpp | 4 +- .../layout/juce_ConcertinaPanel.cpp | 26 +- modules/juce_gui_basics/layout/juce_Grid.cpp | 12 +- modules/juce_gui_basics/layout/juce_Grid.h | 6 +- .../layout/juce_StretchableLayoutManager.cpp | 4 +- .../layout/juce_StretchableObjectResizer.cpp | 6 +- .../layout/juce_TabbedButtonBar.cpp | 10 +- .../lookandfeel/juce_LookAndFeel_V2.cpp | 2 +- .../lookandfeel/juce_LookAndFeel_V3.cpp | 2 +- .../mouse/juce_SelectedItemSet.h | 4 +- .../native/juce_FileChooser_android.cpp | 2 +- .../native/juce_FileChooser_windows.cpp | 2 +- .../native/juce_MainMenu_mac.mm | 8 +- .../native/juce_NSViewComponentPeer_mac.mm | 2 +- .../native/juce_UIViewComponentPeer_ios.mm | 6 +- .../native/juce_Windowing_android.cpp | 6 +- .../native/juce_Windowing_ios.mm | 2 +- .../native/juce_Windowing_windows.cpp | 4 +- .../positioning/juce_MarkerList.cpp | 8 +- .../juce_RelativeCoordinatePositioner.cpp | 4 +- .../positioning/juce_RelativePointPath.cpp | 8 +- .../positioning/juce_RelativeRectangle.cpp | 2 +- .../properties/juce_PropertyComponent.cpp | 2 +- .../properties/juce_PropertyPanel.cpp | 2 +- .../juce_gui_basics/widgets/juce_ComboBox.cpp | 2 +- .../widgets/juce_TableHeaderComponent.cpp | 16 +- .../widgets/juce_TableListBox.cpp | 4 +- .../widgets/juce_TextEditor.cpp | 28 +- .../juce_gui_basics/widgets/juce_Toolbar.cpp | 12 +- .../windows/juce_AlertWindow.cpp | 8 +- .../windows/juce_NativeMessageBox.cpp | 2 +- .../windows/juce_ThreadWithProgressWindow.cpp | 2 +- .../code_editor/juce_CodeDocument.cpp | 2 +- .../code_editor/juce_CodeEditorComponent.cpp | 6 +- .../misc/juce_ColourSelector.cpp | 6 +- .../misc/juce_KeyMappingEditorComponent.cpp | 38 +-- .../misc/juce_LiveConstantEditor.cpp | 10 +- .../misc/juce_LiveConstantEditor.h | 2 +- .../misc/juce_PreferencesPanel.cpp | 2 +- .../misc/juce_RecentlyOpenedFilesList.cpp | 4 +- .../misc/juce_WebBrowserComponent.h | 2 +- .../native/juce_ActiveXComponent_windows.cpp | 4 +- .../native/juce_AndroidViewComponent.cpp | 2 +- .../native/juce_AppleRemote_mac.mm | 2 +- .../native/juce_PushNotifications_android.cpp | 32 +- .../native/juce_WebBrowserComponent_linux.cpp | 4 +- .../native/juce_WebBrowserComponent_mac.mm | 2 +- .../juce_WebBrowserComponent_windows.cpp | 12 +- .../juce_opengl/native/juce_OpenGL_android.h | 8 +- .../opengl/juce_OpenGLGraphicsContext.cpp | 4 +- .../opengl/juce_OpenGLShaderProgram.cpp | 2 +- .../marketplace/juce_OnlineUnlockForm.cpp | 8 +- .../marketplace/juce_OnlineUnlockStatus.cpp | 20 +- .../native/juce_InAppPurchases_android.cpp | 4 +- .../native/juce_InAppPurchases_ios.cpp | 2 +- .../native/juce_CameraDevice_android.h | 6 +- .../native/juce_CameraDevice_windows.h | 16 +- 279 files changed, 1281 insertions(+), 1281 deletions(-) diff --git a/examples/DSP/IIRFilterDemo.h b/examples/DSP/IIRFilterDemo.h index ebc3f63508..5de04b449a 100644 --- a/examples/DSP/IIRFilterDemo.h +++ b/examples/DSP/IIRFilterDemo.h @@ -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 parameters { &typeParam, &cutoffParam, &qParam }; double sampleRate = 0.0; diff --git a/examples/GUI/HelloWorldDemo.h b/examples/GUI/HelloWorldDemo.h index 84454d2691..1eba8bad58 100644 --- a/examples/GUI/HelloWorldDemo.h +++ b/examples/GUI/HelloWorldDemo.h @@ -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; //============================================================================== diff --git a/examples/GUI/OpenGLDemo.h b/examples/GUI/OpenGLDemo.h index 4dd5d0e92f..44485b58bb 100644 --- a/examples/GUI/OpenGLDemo.h +++ b/examples/GUI/OpenGLDemo.h @@ -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)); diff --git a/examples/GUI/VideoDemo.h b/examples/GUI/VideoDemo.h index 23bcdedbac..74ddb7eb50 100644 --- a/examples/GUI/VideoDemo.h +++ b/examples/GUI/VideoDemo.h @@ -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 diff --git a/examples/GUI/WidgetsDemo.h b/examples/GUI/WidgetsDemo.h index 956d124e96..320f9e048b 100644 --- a/examples/GUI/WidgetsDemo.h +++ b/examples/GUI/WidgetsDemo.h @@ -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 diff --git a/examples/Plugins/ARAPluginDemo.h b/examples/Plugins/ARAPluginDemo.h index 1e2c56b0d2..50aaa7b9ab 100644 --- a/examples/Plugins/ARAPluginDemo.h +++ b/examples/Plugins/ARAPluginDemo.h @@ -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 (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); diff --git a/examples/Plugins/AUv3SynthPluginDemo.h b/examples/Plugins/AUv3SynthPluginDemo.h index ccc162e7aa..c631155f0e 100644 --- a/examples/Plugins/AUv3SynthPluginDemo.h +++ b/examples/Plugins/AUv3SynthPluginDemo.h @@ -111,7 +111,7 @@ public: ignoreUnused (style, minSliderPos, maxSliderPos); auto r = Rectangle (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 (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) { diff --git a/examples/Plugins/SamplerPluginDemo.h b/examples/Plugins/SamplerPluginDemo.h index 674aa5e7dd..af0fc61fed 100644 --- a/examples/Plugins/SamplerPluginDemo.h +++ b/examples/Plugins/SamplerPluginDemo.h @@ -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(); } diff --git a/examples/Utilities/NetworkingDemo.h b/examples/Utilities/NetworkingDemo.h index 6447d3d239..c74e46355b 100644 --- a/examples/Utilities/NetworkingDemo.h +++ b/examples/Utilities/NetworkingDemo.h @@ -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))) { diff --git a/examples/Utilities/OSCDemo.h b/examples/Utilities/OSCDemo.h index f97ad22451..898e6acb0d 100644 --- a/examples/Utilities/OSCDemo.h +++ b/examples/Utilities/OSCDemo.h @@ -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)"); } //============================================================================== diff --git a/examples/Utilities/PushNotificationsDemo.h b/examples/Utilities/PushNotificationsDemo.h index e22190a29a..434ae055e8 100644 --- a/examples/Utilities/PushNotificationsDemo.h +++ b/examples/Utilities/PushNotificationsDemo.h @@ -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); diff --git a/examples/Utilities/XMLandJSONDemo.h b/examples/Utilities/XMLandJSONDemo.h index cc603e3519..14831bbb33 100644 --- a/examples/Utilities/XMLandJSONDemo.h +++ b/examples/Utilities/XMLandJSONDemo.h @@ -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()); } diff --git a/extras/AudioPluginHost/Source/HostStartup.cpp b/extras/AudioPluginHost/Source/HostStartup.cpp index 372c202e76..b3c5e4ba78 100644 --- a/extras/AudioPluginHost/Source/HostStartup.cpp +++ b/extras/AudioPluginHost/Source/HostStartup.cpp @@ -258,7 +258,7 @@ private: std::unique_ptr storedScannerSubprocess; }; -static PluginHostApp& getApp() { return *dynamic_cast(JUCEApplication::getInstance()); } +static PluginHostApp& getApp() { return *dynamic_cast (JUCEApplication::getInstance()); } ApplicationProperties& getAppProperties() { return *getApp().appProperties; } ApplicationCommandManager& getCommandManager() { return getApp().commandManager; } diff --git a/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp index f02e4a18f2..b084f3f6fd 100644 --- a/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp +++ b/extras/AudioPluginHost/Source/Plugins/IOConfigurationWindow.cpp @@ -524,7 +524,7 @@ MainHostWindow* IOConfigurationWindow::getMainWindow() const auto& desktop = Desktop::getInstance(); for (int i = desktop.getNumComponents(); --i >= 0;) - if (auto* mainWindow = dynamic_cast (desktop.getComponent(i))) + if (auto* mainWindow = dynamic_cast (desktop.getComponent (i))) return mainWindow; return nullptr; diff --git a/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp b/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp index 95f441ef9d..07cc365430 100644 --- a/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp +++ b/extras/AudioPluginHost/Source/Plugins/PluginGraph.cpp @@ -66,7 +66,7 @@ void PluginGraph::changeListenerCallback (ChangeBroadcaster*) changed(); for (int i = activePluginWindows.size(); --i >= 0;) - if (! graph.getNodes().contains (activePluginWindows.getUnchecked(i)->node)) + if (! graph.getNodes().contains (activePluginWindows.getUnchecked (i)->node)) activePluginWindows.remove (i); } diff --git a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp index 83fbdb8adf..115cdc5031 100644 --- a/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp +++ b/extras/AudioPluginHost/Source/UI/GraphEditorPanel.cpp @@ -847,11 +847,11 @@ void GraphEditorPanel::changeListenerCallback (ChangeBroadcaster*) void GraphEditorPanel::updateComponents() { for (int i = nodes.size(); --i >= 0;) - if (graph.graph.getNodeForId (nodes.getUnchecked(i)->pluginID) == nullptr) + if (graph.graph.getNodeForId (nodes.getUnchecked (i)->pluginID) == nullptr) nodes.remove (i); for (int i = connectors.size(); --i >= 0;) - if (! graph.graph.isConnected (connectors.getUnchecked(i)->connection)) + if (! graph.graph.isConnected (connectors.getUnchecked (i)->connection)) connectors.remove (i); for (auto* fc : nodes) @@ -1283,7 +1283,7 @@ void GraphDocumentComponent::resized() const int statusHeight = 20; if (isOnTouchDevice()) - titleBarComponent->setBounds (r.removeFromTop(titleBarHeight)); + titleBarComponent->setBounds (r.removeFromTop (titleBarHeight)); keyboardComp->setBounds (r.removeFromBottom (keysHeight)); statusBar->setBounds (r.removeFromBottom (statusHeight)); diff --git a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp index 979c5ca69a..52e660830a 100644 --- a/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp +++ b/extras/AudioPluginHost/Source/UI/MainHostWindow.cpp @@ -759,7 +759,7 @@ void MainHostWindow::getCommandInfo (const CommandID commandID, ApplicationComma #if ! (JUCE_IOS || JUCE_ANDROID) case CommandIDs::newFile: result.setInfo ("New", "Creates a new filter graph file", category, 0); - result.defaultKeypresses.add(KeyPress('n', ModifierKeys::commandModifier, 0)); + result.defaultKeypresses.add (KeyPress ('n', ModifierKeys::commandModifier, 0)); break; case CommandIDs::open: @@ -1002,7 +1002,7 @@ void MainHostWindow::filesDropped (const StringArray& files, int x, int y) auto pos = graphHolder->getLocalPoint (this, Point (x, y)); for (int i = 0; i < jmin (5, typesFound.size()); ++i) - if (auto* desc = typesFound.getUnchecked(i)) + if (auto* desc = typesFound.getUnchecked (i)) createPlugin (PluginDescriptionAndPreference { *desc }, pos); } } diff --git a/extras/AudioPluginHost/Source/UI/PluginWindow.h b/extras/AudioPluginHost/Source/UI/PluginWindow.h index 306b5dae29..eb3c509741 100644 --- a/extras/AudioPluginHost/Source/UI/PluginWindow.h +++ b/extras/AudioPluginHost/Source/UI/PluginWindow.h @@ -99,7 +99,7 @@ private: void resized() override { - list.setBounds(getLocalBounds()); + list.setBounds (getLocalBounds()); } int getNumRows() override diff --git a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp index b3c39380e2..c6ff12dd58 100644 --- a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp +++ b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.cpp @@ -90,7 +90,7 @@ namespace build_tools for (int i = 0; i < files.size(); ++i) { - auto& file = files.getReference(i); + auto& file = files.getReference (i); if (! file.existsAsFile()) return Result::fail ("Can't open resource file: " + file.getFullPathName()); @@ -142,7 +142,7 @@ namespace build_tools while (i < files.size()) { - auto& file = files.getReference(i); + auto& file = files.getReference (i); auto variableName = variableNames[i]; FileInputStream fileStream (file); diff --git a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h index f885b3cb91..420bbf1e74 100644 --- a/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h +++ b/extras/Build/juce_build_tools/utils/juce_BinaryResourceFile.h @@ -42,7 +42,7 @@ namespace build_tools String getSizeVariableFor (const File& file) const; - int getNumFiles() const { return files.size (); } + int getNumFiles() const { return files.size(); } const File& getFile (int index) const { return files.getReference (index); } diff --git a/extras/Build/juce_build_tools/utils/juce_ProjectType.h b/extras/Build/juce_build_tools/utils/juce_ProjectType.h index cbfd1f235b..32161eb6a2 100644 --- a/extras/Build/juce_build_tools/utils/juce_ProjectType.h +++ b/extras/Build/juce_build_tools/utils/juce_ProjectType.h @@ -44,8 +44,8 @@ namespace build_tools const auto& types = getAllTypes(); for (auto i = types.size(); --i >= 0;) - if (types.getUnchecked(i)->getType() == typeCode) - return types.getUnchecked(i); + if (types.getUnchecked (i)->getType() == typeCode) + return types.getUnchecked (i); jassertfalse; return nullptr; @@ -319,7 +319,7 @@ namespace build_tools static ProjectType_AudioPlugin plugin; static ProjectType_ARAAudioPlugin araplugin; - return Array(&guiApp, &consoleApp, &staticLib, &dll, &plugin, &araplugin); + return Array (&guiApp, &consoleApp, &staticLib, &dll, &plugin, &araplugin); } } } diff --git a/extras/NetworkGraphicsDemo/Source/Demos.h b/extras/NetworkGraphicsDemo/Source/Demos.h index aa31d2c360..839d29961f 100644 --- a/extras/NetworkGraphicsDemo/Source/Demos.h +++ b/extras/NetworkGraphicsDemo/Source/Demos.h @@ -158,7 +158,7 @@ struct FlockDemo : public BackgroundLogo for (int i = 0; i < birds.size(); ++i) for (int j = i + 1; j < birds.size(); ++j) - attractBirds (birds.getReference(i), birds.getReference(j)); + attractBirds (birds.getReference (i), birds.getReference (j)); for (auto& b : birds) { @@ -172,8 +172,8 @@ struct FlockDemo : public BackgroundLogo for (int i = rings.size(); --i >= 0;) { - if (rings.getReference(i).update()) - rings.getReference(i).draw (g); + if (rings.getReference (i).update()) + rings.getReference (i).draw (g); else rings.remove (i); } diff --git a/extras/NetworkGraphicsDemo/Source/MasterComponent.h b/extras/NetworkGraphicsDemo/Source/MasterComponent.h index 3e5c6656c6..ec35fc4e56 100644 --- a/extras/NetworkGraphicsDemo/Source/MasterComponent.h +++ b/extras/NetworkGraphicsDemo/Source/MasterComponent.h @@ -241,7 +241,7 @@ private: void updateDeviceComponents() { for (int i = devices.size(); --i >= 0;) - if (getClient (devices.getUnchecked(i)->getName()) == nullptr) + if (getClient (devices.getUnchecked (i)->getName()) == nullptr) devices.remove (i); for (const auto& c : clients) diff --git a/extras/NetworkGraphicsDemo/Source/SharedCanvas.h b/extras/NetworkGraphicsDemo/Source/SharedCanvas.h index 0a5f564cf1..e92c1f1a70 100644 --- a/extras/NetworkGraphicsDemo/Source/SharedCanvas.h +++ b/extras/NetworkGraphicsDemo/Source/SharedCanvas.h @@ -242,7 +242,7 @@ private: for (int i = 0; i < cg.getNumColours(); ++i) { out.writeDouble (cg.getColourPosition (i)); - out.writeInt ((int) cg.getColour(i).getARGB()); + out.writeInt ((int) cg.getColour (i).getARGB()); } } else @@ -467,7 +467,7 @@ struct BlockPacketiser for (int i = 0; i < blocks.size(); ++i) { auto index = (uint32) ByteOrder::swapIfBigEndian (i); - blocks.getReference(i).append (&index, sizeof (index)); + blocks.getReference (i).append (&index, sizeof (index)); } } @@ -487,7 +487,7 @@ struct BlockPacketiser if (blocks.size() > 1) { for (int i = 0; i < blocks.size() - 1; ++i) - result.append (blocks.getReference(i).getData(), blocks.getReference(i).getSize() - 4); + result.append (blocks.getReference (i).getData(), blocks.getReference (i).getSize() - 4); String storedMD5 (String (CharPointer_ASCII ((const char*) blocks.getLast().getData())) .fromFirstOccurrenceOf (getLastPacketPrefix(), false, false)); diff --git a/extras/Projucer/Source/Application/Windows/jucer_TranslationToolWindowComponent.h b/extras/Projucer/Source/Application/Windows/jucer_TranslationToolWindowComponent.h index 43aed72e33..2242f9fe76 100644 --- a/extras/Projucer/Source/Application/Windows/jucer_TranslationToolWindowComponent.h +++ b/extras/Projucer/Source/Application/Windows/jucer_TranslationToolWindowComponent.h @@ -162,7 +162,7 @@ private: StringArray strings; TranslationHelpers::scanFolderForTranslations (strings, fc.getResult()); - setPreTranslationText (TranslationHelpers::mungeStrings(strings)); + setPreTranslationText (TranslationHelpers::mungeStrings (strings)); }); } @@ -196,7 +196,7 @@ private: Label label1, label2, label3, label4; Label instructionsLabel; - TextButton generateButton { TRANS("Generate") }, + TextButton generateButton { TRANS ("Generate") }, scanProjectButton { "Scan project for TRANS macros" }, scanFolderButton { "Scan folder for TRANS macros" }, loadTranslationButton { "Load existing translation file..."}; diff --git a/extras/Projucer/Source/Application/jucer_Application.cpp b/extras/Projucer/Source/Application/jucer_Application.cpp index ccacd0c0b4..eba0f5ced5 100644 --- a/extras/Projucer/Source/Application/jucer_Application.cpp +++ b/extras/Projucer/Source/Application/jucer_Application.cpp @@ -501,7 +501,7 @@ PopupMenu ProjucerApplication::createDocumentMenu() for (int i = 0; i < numDocs; ++i) { - OpenDocumentManager::Document* doc = openDocumentManager.getOpenDocument(i); + OpenDocumentManager::Document* doc = openDocumentManager.getOpenDocument (i); menu.addItem (activeDocumentsBaseID + i, doc->getName()); } @@ -1156,7 +1156,7 @@ void ProjucerApplication::saveAllDocuments() openDocumentManager.saveAllSyncWithoutAsking(); for (int i = 0; i < mainWindowList.windows.size(); ++i) - if (auto* pcc = mainWindowList.windows.getUnchecked(i)->getProjectContentComponent()) + if (auto* pcc = mainWindowList.windows.getUnchecked (i)->getProjectContentComponent()) pcc->refreshProjectTreeFileStatuses(); } @@ -1352,7 +1352,7 @@ void ProjucerApplication::deleteLogger() files.addUsingDefaultSort (f); for (int i = 0; i < files.size() - maxNumLogFilesToKeep; ++i) - files.getReference(i).file.deleteFile(); + files.getReference (i).file.deleteFile(); } } diff --git a/extras/Projucer/Source/Application/jucer_CommandLine.cpp b/extras/Projucer/Source/Application/jucer_CommandLine.cpp index b100b6f43a..3f861e8911 100644 --- a/extras/Projucer/Source/Application/jucer_CommandLine.cpp +++ b/extras/Projucer/Source/Application/jucer_CommandLine.cpp @@ -229,7 +229,7 @@ namespace command.add ("-m"); command.add (version.quoted()); - std::cout << "Performing command: " << command.joinIntoString(" ") << std::endl; + std::cout << "Performing command: " << command.joinIntoString (" ") << std::endl; ChildProcess c; @@ -525,7 +525,7 @@ namespace auto files = findAllSourceFiles (target); for (int i = 0; i < files.size(); ++i) - fixIncludes (files.getReference(i), files); + fixIncludes (files.getReference (i), files); } //============================================================================== @@ -586,7 +586,7 @@ namespace } for (int i = 0; i < sections.size(); ++i) - sections.getReference(i).index = i; + sections.getReference (i).index = i; for (int i = 0; i < sections.size(); ++i) sections.swap (i, rng.nextInt (sections.size())); @@ -597,7 +597,7 @@ namespace << "{" << preferredLineFeed; for (int i = 0; i < sections.size(); ++i) - sections.getReference(i).writeGenerator (out); + sections.getReference (i).writeGenerator (out); out << preferredLineFeed << " String result = " << getStringConcatenationExpression (rng, 0, sections.size()) << ";" << preferredLineFeed diff --git a/extras/Projucer/Source/Application/jucer_MainWindow.cpp b/extras/Projucer/Source/Application/jucer_MainWindow.cpp index 9521e8c2ed..002bfa618a 100644 --- a/extras/Projucer/Source/Application/jucer_MainWindow.cpp +++ b/extras/Projucer/Source/Application/jucer_MainWindow.cpp @@ -560,14 +560,14 @@ bool MainWindow::shouldDropFilesWhenDraggedExternally (const DragAndDropTarget:: Array selected; for (int i = tv->getNumSelectedItems(); --i >= 0;) - if (auto* b = dynamic_cast (tv->getSelectedItem(i))) + if (auto* b = dynamic_cast (tv->getSelectedItem (i))) selected.add (b); if (! selected.isEmpty()) { for (int i = selected.size(); --i >= 0;) { - if (auto* jtvb = selected.getUnchecked(i)) + if (auto* jtvb = selected.getUnchecked (i)) { auto f = jtvb->getDraggableFile(); @@ -801,7 +801,7 @@ void MainWindowList::openDocument (OpenDocumentManager::Document* doc, bool grab for (int i = desktop.getNumComponents(); --i >= 0;) { - if (auto* mw = dynamic_cast (desktop.getComponent(i))) + if (auto* mw = dynamic_cast (desktop.getComponent (i))) { if (auto* pcc = mw->getProjectContentComponent()) { @@ -1012,7 +1012,7 @@ void MainWindowList::saveCurrentlyOpenProjectList() for (int i = 0; i < desktop.getNumComponents(); ++i) { - if (auto* mw = dynamic_cast (desktop.getComponent(i))) + if (auto* mw = dynamic_cast (desktop.getComponent (i))) if (auto* p = mw->getProject()) if (! p->isTemporaryProject()) projects.add (p->getFile()); @@ -1041,7 +1041,7 @@ Project* MainWindowList::getFrontmostProject() auto& desktop = Desktop::getInstance(); for (int i = desktop.getNumComponents(); --i >= 0;) - if (auto* mw = dynamic_cast (desktop.getComponent(i))) + if (auto* mw = dynamic_cast (desktop.getComponent (i))) if (auto* p = mw->getProject()) return p; diff --git a/extras/Projucer/Source/CodeEditor/jucer_OpenDocumentManager.cpp b/extras/Projucer/Source/CodeEditor/jucer_OpenDocumentManager.cpp index a27df6574a..4f01246467 100644 --- a/extras/Projucer/Source/CodeEditor/jucer_OpenDocumentManager.cpp +++ b/extras/Projucer/Source/CodeEditor/jucer_OpenDocumentManager.cpp @@ -127,7 +127,7 @@ void OpenDocumentManager::removeListener (DocumentCloseListener* listener) bool OpenDocumentManager::canOpenFile (const File& file) { for (int i = types.size(); --i >= 0;) - if (types.getUnchecked(i)->canOpenFile (file)) + if (types.getUnchecked (i)->canOpenFile (file)) return true; return false; @@ -136,16 +136,16 @@ bool OpenDocumentManager::canOpenFile (const File& file) OpenDocumentManager::Document* OpenDocumentManager::openFile (Project* project, const File& file) { for (int i = documents.size(); --i >= 0;) - if (documents.getUnchecked(i)->isForFile (file)) - return documents.getUnchecked(i); + if (documents.getUnchecked (i)->isForFile (file)) + return documents.getUnchecked (i); Document* d = nullptr; for (int i = types.size(); --i >= 0 && d == nullptr;) { - if (types.getUnchecked(i)->canOpenFile (file)) + if (types.getUnchecked (i)->canOpenFile (file)) { - d = types.getUnchecked(i)->openFile (project, file); + d = types.getUnchecked (i)->openFile (project, file); jassert (d != nullptr); } } @@ -448,7 +448,7 @@ OpenDocumentManager::Document* RecentDocumentList::getNext() bool RecentDocumentList::contains (const File& f) const { for (int i = previousDocs.size(); --i >= 0;) - if (previousDocs.getUnchecked(i)->getFile() == f) + if (previousDocs.getUnchecked (i)->getFile() == f) return true; return false; @@ -457,8 +457,8 @@ bool RecentDocumentList::contains (const File& f) const OpenDocumentManager::Document* RecentDocumentList::getClosestPreviousDocOtherThan (OpenDocumentManager::Document* oneToAvoid) const { for (int i = previousDocs.size(); --i >= 0;) - if (previousDocs.getUnchecked(i) != oneToAvoid) - return previousDocs.getUnchecked(i); + if (previousDocs.getUnchecked (i) != oneToAvoid) + return previousDocs.getUnchecked (i); return nullptr; } @@ -512,7 +512,7 @@ static void saveDocList (const Array & list, Xml { for (int i = 0; i < list.size(); ++i) { - const OpenDocumentManager::Document& doc = *list.getUnchecked(i); + const OpenDocumentManager::Document& doc = *list.getUnchecked (i); XmlElement* e = xml.createNewChildElement ("DOC"); diff --git a/extras/Projucer/Source/CodeEditor/jucer_SourceCodeEditor.cpp b/extras/Projucer/Source/CodeEditor/jucer_SourceCodeEditor.cpp index 3e4bf7d50d..d28a2c245a 100644 --- a/extras/Projucer/Source/CodeEditor/jucer_SourceCodeEditor.cpp +++ b/extras/Projucer/Source/CodeEditor/jucer_SourceCodeEditor.cpp @@ -117,7 +117,7 @@ void SourceCodeDocument::saveAsync (std::function callback) void SourceCodeDocument::saveAsAsync (std::function callback) { - chooser = std::make_unique (TRANS("Save As..."), getFile(), "*"); + chooser = std::make_unique (TRANS ("Save As..."), getFile(), "*"); auto flags = FileBrowserComponent::saveMode | FileBrowserComponent::canSelectFiles | FileBrowserComponent::warnAboutOverwriting; @@ -643,7 +643,7 @@ void CppCodeEditorComponent::addPopupMenuItems (PopupMenu& menu, const MouseEven GenericCodeEditorComponent::addPopupMenuItems (menu, e); menu.addSeparator(); - menu.addItem (insertComponentID, TRANS("Insert code for a new Component class...")); + menu.addItem (insertComponentID, TRANS ("Insert code for a new Component class...")); } void CppCodeEditorComponent::performPopupMenuAction (int menuItemID) diff --git a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_FillType.h b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_FillType.h index 6c791fa106..e8a3ca9b8e 100644 --- a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_FillType.h +++ b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_FillType.h @@ -385,7 +385,7 @@ private: for (int i = 0; i < resourceFile.getNumFiles(); ++i) { - const File& file = resourceFile.getFile(i); + const File& file = resourceFile.getFile (i); if (imageResourceName == resourceFile.getClassName() + "::" + resourceFile.getDataVariableFor (file)) { diff --git a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ImageResourceProperty.h b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ImageResourceProperty.h index 3ef8cfc462..6aae0de559 100644 --- a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ImageResourceProperty.h +++ b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_ImageResourceProperty.h @@ -127,9 +127,9 @@ public: for (int i = 0; i < resourceFile.getNumFiles(); ++i) { - const File& file = resourceFile.getFile(i); + const File& file = resourceFile.getFile (i); - if (ImageFileFormat::findImageFormatForFileExtension(file)) + if (ImageFileFormat::findImageFormatForFileExtension (file)) choices.add (resourceFile.getClassName() + "::" + resourceFile.getDataVariableFor (file)); } } diff --git a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.cpp b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.cpp index 561fab59be..992662a061 100644 --- a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.cpp +++ b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElement.cpp @@ -291,7 +291,7 @@ void PaintElement::updateBounds (const Rectangle& parentArea) borderThickness)); for (int i = siblingComponents.size(); --i >= 0;) - siblingComponents.getUnchecked(i)->updatePosition(); + siblingComponents.getUnchecked (i)->updatePosition(); } } @@ -652,7 +652,7 @@ void PaintElement::updateSiblingComps() createSiblingComponents(); for (int i = siblingComponents.size(); --i >= 0;) - siblingComponents.getUnchecked(i)->updatePosition(); + siblingComponents.getUnchecked (i)->updatePosition(); } else { diff --git a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.cpp b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.cpp index 6d11c76a81..51aefd3d8f 100644 --- a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.cpp +++ b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementGroup.cpp @@ -42,7 +42,7 @@ void PaintElementGroup::ungroup (const bool undoable) for (int i = 0; i < subElements.size(); ++i) { - std::unique_ptr xml (subElements.getUnchecked(i)->createXml()); + std::unique_ptr xml (subElements.getUnchecked (i)->createXml()); PaintElement* newOne = getOwner()->addElementFromXml (*xml, index, undoable); getOwner()->getSelectedElements().addToSelection (newOne); @@ -62,7 +62,7 @@ void PaintElementGroup::groupSelected (PaintRoutine* routine) { if (routine->getSelectedElements().isSelected (routine->getElement (i))) { - std::unique_ptr xml (routine->getElement(i)->createXml()); + std::unique_ptr xml (routine->getElement (i)->createXml()); if (auto* newOne = ObjectTypes::createElementForXml (xml.get(), routine)) newGroup->subElements.add (newOne); @@ -91,7 +91,7 @@ bool PaintElementGroup::containsElement (const PaintElement* element) const return true; for (int i = subElements.size(); --i >= 0;) - if (PaintElementGroup* pg = dynamic_cast (subElements.getUnchecked(i))) + if (PaintElementGroup* pg = dynamic_cast (subElements.getUnchecked (i))) if (pg->containsElement (element)) return true; @@ -109,10 +109,10 @@ Rectangle PaintElementGroup::getCurrentBounds (const Rectangle& parent if (subElements.size() > 0) { - r = subElements.getUnchecked(0)->getCurrentBounds (parentArea); + r = subElements.getUnchecked (0)->getCurrentBounds (parentArea); for (int i = 1; i < subElements.size(); ++i) - r = r.getUnion (subElements.getUnchecked(i)->getCurrentBounds (parentArea)); + r = r.getUnion (subElements.getUnchecked (i)->getCurrentBounds (parentArea)); } return r; @@ -138,7 +138,7 @@ void PaintElementGroup::setCurrentBounds (const Rectangle& b, const Rectang for (int i = 0; i < subElements.size(); ++i) { - PaintElement* const e = subElements.getUnchecked(i); + PaintElement* const e = subElements.getUnchecked (i); Rectangle pos (e->getCurrentBounds (parentArea)); @@ -158,7 +158,7 @@ void PaintElementGroup::setCurrentBounds (const Rectangle& b, const Rectang void PaintElementGroup::draw (Graphics& g, const ComponentLayout* layout, const Rectangle& parentArea) { for (int i = 0; i < subElements.size(); ++i) - subElements.getUnchecked(i)->draw (g, layout, parentArea); + subElements.getUnchecked (i)->draw (g, layout, parentArea); } void PaintElementGroup::getEditableProperties (Array& props, bool multipleSelected) @@ -170,7 +170,7 @@ void PaintElementGroup::getEditableProperties (Array& props, void PaintElementGroup::fillInGeneratedCode (GeneratedCode& code, String& paintMethodCode) { for (int i = 0; i < subElements.size(); ++i) - subElements.getUnchecked(i)->fillInGeneratedCode (code, paintMethodCode); + subElements.getUnchecked (i)->fillInGeneratedCode (code, paintMethodCode); } const char* PaintElementGroup::getTagName() noexcept { return "GROUP"; } @@ -181,7 +181,7 @@ XmlElement* PaintElementGroup::createXml() const for (int i = 0; i < subElements.size(); ++i) { - XmlElement* const sub = subElements.getUnchecked(i)->createXml(); + XmlElement* const sub = subElements.getUnchecked (i)->createXml(); e->addChildElement (sub); } diff --git a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.cpp b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.cpp index f37a7c9aa4..01471970f9 100644 --- a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.cpp +++ b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementPath.cpp @@ -203,7 +203,7 @@ void PaintElementPath::setCurrentBounds (const Rectangle& b, for (int i = 0; i < points.size(); ++i) { - PathPoint* const destPoint = points.getUnchecked(i); + PathPoint* const destPoint = points.getUnchecked (i); PathPoint p (*destPoint); for (int j = p.getNumPoints(); --j >= 0;) @@ -455,14 +455,14 @@ void PaintElementPath::fillInGeneratedCode (GeneratedCode& code, String& paintMe { s << " "; fillType.fillInGeneratedCode ("fill", zero, code, s); - s << " g.fillPath (" << pathVariable << ", juce::AffineTransform::translation(x, y));\n"; + s << " g.fillPath (" << pathVariable << ", juce::AffineTransform::translation (x, y));\n"; } if (isStrokePresent && ! strokeType.isInvisible()) { s << " "; strokeType.fill.fillInGeneratedCode ("stroke", zero, code, s); - s << " g.strokePath (" << pathVariable << ", " << strokeType.getPathStrokeCode() << ", juce::AffineTransform::translation(x, y));\n"; + s << " g.strokePath (" << pathVariable << ", " << strokeType.getPathStrokeCode() << ", juce::AffineTransform::translation (x, y));\n"; } s << "}\n\n"; @@ -477,7 +477,7 @@ void PaintElementPath::applyCustomPaintSnippets (StringArray& snippets) if (! snippets.isEmpty() && (! fillType.isInvisible() || (isStrokePresent && ! strokeType.isInvisible()))) { customPaintCode = snippets[0]; - snippets.remove(0); + snippets.remove (0); } } @@ -517,7 +517,7 @@ void PaintElementPath::createSiblingComponents() for (int i = 0; i < points.size(); ++i) { - switch (points.getUnchecked(i)->type) + switch (points.getUnchecked (i)->type) { case Path::Iterator::startNewSubPath: siblingComponents.add (new PathPointComponent (this, i, 0)); @@ -544,8 +544,8 @@ void PaintElementPath::createSiblingComponents() for (int i = 0; i < siblingComponents.size(); ++i) { - getParentComponent()->addAndMakeVisible (siblingComponents.getUnchecked(i)); - siblingComponents.getUnchecked(i)->updatePosition(); + getParentComponent()->addAndMakeVisible (siblingComponents.getUnchecked (i)); + siblingComponents.getUnchecked (i)->updatePosition(); } } @@ -556,7 +556,7 @@ String PaintElementPath::pathToString() const for (int i = 0; i < points.size(); ++i) { - const PathPoint* const p = points.getUnchecked(i); + const PathPoint* const p = points.getUnchecked (i); switch (p->type) { @@ -703,7 +703,7 @@ void PaintElementPath::updateStoredPath (const ComponentLayout* layout, const Re for (int i = 0; i < points.size(); ++i) { - const PathPoint* const p = points.getUnchecked(i); + const PathPoint* const p = points.getUnchecked (i); switch (p->type) { diff --git a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h index c5cfa41049..8f754a4f97 100644 --- a/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h +++ b/extras/Projucer/Source/ComponentEditor/PaintElements/jucer_PaintElementUndoableAction.h @@ -60,7 +60,7 @@ public: for (int i = 1; i < containerGroups.size(); ++i) { - group = dynamic_cast (group->getElement (containerGroups.getUnchecked(i))); + group = dynamic_cast (group->getElement (containerGroups.getUnchecked (i))); if (group == nullptr) return nullptr; diff --git a/extras/Projucer/Source/ComponentEditor/Properties/jucer_FontPropertyComponent.h b/extras/Projucer/Source/ComponentEditor/Properties/jucer_FontPropertyComponent.h index d1fe26469d..f0ccd0b26b 100644 --- a/extras/Projucer/Source/ComponentEditor/Properties/jucer_FontPropertyComponent.h +++ b/extras/Projucer/Source/ComponentEditor/Properties/jucer_FontPropertyComponent.h @@ -124,7 +124,7 @@ public: << CodeHelpers::floatLiteral (font.getHeight(), 2) << ", "; - if (font.getAvailableStyles().contains(font.getTypefaceStyle())) + if (font.getAvailableStyles().contains (font.getTypefaceStyle())) s << "juce::Font::plain).withTypefaceStyle (" << CodeHelpers::stringLiteral (font.getTypefaceStyle()) << ")"; diff --git a/extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentLayoutEditor.cpp b/extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentLayoutEditor.cpp index c4ec373b4e..b4e94c6862 100644 --- a/extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentLayoutEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/UI/jucer_ComponentLayoutEditor.cpp @@ -393,8 +393,8 @@ void ComponentLayoutEditor::itemDropped (const SourceDetails& dragSourceDetails) StringArray filenames; for (int i = 0; i < selectedNodes.size(); ++i) - if (selectedNodes.getUnchecked(i)->getFile().hasFileExtension (cppFileExtensions)) - filenames.add (selectedNodes.getUnchecked(i)->getFile().getFullPathName()); + if (selectedNodes.getUnchecked (i)->getFile().hasFileExtension (cppFileExtensions)) + filenames.add (selectedNodes.getUnchecked (i)->getFile().getFullPathName()); filesDropped (filenames, dragSourceDetails.localPosition.x, dragSourceDetails.localPosition.y); } diff --git a/extras/Projucer/Source/ComponentEditor/UI/jucer_EditingPanelBase.cpp b/extras/Projucer/Source/ComponentEditor/UI/jucer_EditingPanelBase.cpp index 953eee6259..7b7d332036 100644 --- a/extras/Projucer/Source/ComponentEditor/UI/jucer_EditingPanelBase.cpp +++ b/extras/Projucer/Source/ComponentEditor/UI/jucer_EditingPanelBase.cpp @@ -53,7 +53,7 @@ public: private: void updateBounds (Component* child) { - auto childArea = getLocalArea(child, child->getLocalBounds()); + auto childArea = getLocalArea (child, child->getLocalBounds()); setSize (childArea.getWidth(), childArea.getHeight()); } diff --git a/extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.cpp b/extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.cpp index 05f72a8ffc..0ec8381dbe 100644 --- a/extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.cpp +++ b/extras/Projucer/Source/ComponentEditor/UI/jucer_JucerDocumentEditor.cpp @@ -744,25 +744,25 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application switch (commandID) { case JucerCommandIDs::toFront: - result.setInfo (TRANS("Bring to front"), TRANS("Brings the currently selected component to the front."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Bring to front"), TRANS ("Brings the currently selected component to the front."), CommandCategories::editing, 0); result.setActive (isSomethingSelected()); result.defaultKeypresses.add (KeyPress ('f', cmd, 0)); break; case JucerCommandIDs::toBack: - result.setInfo (TRANS("Send to back"), TRANS("Sends the currently selected component to the back."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Send to back"), TRANS ("Sends the currently selected component to the back."), CommandCategories::editing, 0); result.setActive (isSomethingSelected()); result.defaultKeypresses.add (KeyPress ('b', cmd, 0)); break; case JucerCommandIDs::group: - result.setInfo (TRANS("Group selected items"), TRANS("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Group selected items"), TRANS ("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0); result.setActive (currentPaintRoutine != nullptr && currentPaintRoutine->getSelectedElements().getNumSelected() > 1); result.defaultKeypresses.add (KeyPress ('k', cmd, 0)); break; case JucerCommandIDs::ungroup: - result.setInfo (TRANS("Ungroup selected items"), TRANS("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Ungroup selected items"), TRANS ("Turns the currently selected elements into a single group object."), CommandCategories::editing, 0); result.setActive (currentPaintRoutine != nullptr && currentPaintRoutine->getSelectedElements().getNumSelected() == 1 && currentPaintRoutine->getSelectedElements().getSelectedItem (0)->getTypeName() == "Group"); @@ -770,60 +770,60 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application break; case JucerCommandIDs::test: - result.setInfo (TRANS("Test component..."), TRANS("Runs the current component interactively."), CommandCategories::view, 0); + result.setInfo (TRANS ("Test component..."), TRANS ("Runs the current component interactively."), CommandCategories::view, 0); result.defaultKeypresses.add (KeyPress ('t', cmd, 0)); break; case JucerCommandIDs::enableSnapToGrid: - result.setInfo (TRANS("Enable snap-to-grid"), TRANS("Toggles whether components' positions are aligned to a grid."), CommandCategories::view, 0); + result.setInfo (TRANS ("Enable snap-to-grid"), TRANS ("Toggles whether components' positions are aligned to a grid."), CommandCategories::view, 0); result.setTicked (document != nullptr && document->isSnapActive (false)); result.defaultKeypresses.add (KeyPress ('g', cmd, 0)); break; case JucerCommandIDs::showGrid: - result.setInfo (TRANS("Show snap-to-grid"), TRANS("Toggles whether the snapping grid is displayed on-screen."), CommandCategories::view, 0); + result.setInfo (TRANS ("Show snap-to-grid"), TRANS ("Toggles whether the snapping grid is displayed on-screen."), CommandCategories::view, 0); result.setTicked (document != nullptr && document->isSnapShown()); result.defaultKeypresses.add (KeyPress ('g', cmd | shift, 0)); break; case JucerCommandIDs::editCompLayout: - result.setInfo (TRANS("Edit sub-component layout"), TRANS("Switches to the sub-component editor view."), CommandCategories::view, 0); + result.setInfo (TRANS ("Edit sub-component layout"), TRANS ("Switches to the sub-component editor view."), CommandCategories::view, 0); result.setTicked (currentLayout != nullptr); result.defaultKeypresses.add (KeyPress ('n', cmd, 0)); break; case JucerCommandIDs::editCompGraphics: - result.setInfo (TRANS("Edit background graphics"), TRANS("Switches to the background graphics editor view."), CommandCategories::view, 0); + result.setInfo (TRANS ("Edit background graphics"), TRANS ("Switches to the background graphics editor view."), CommandCategories::view, 0); result.setTicked (currentPaintRoutine != nullptr); result.defaultKeypresses.add (KeyPress ('m', cmd, 0)); break; case JucerCommandIDs::bringBackLostItems: - result.setInfo (TRANS("Retrieve offscreen items"), TRANS("Moves any items that are lost beyond the edges of the screen back to the centre."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Retrieve offscreen items"), TRANS ("Moves any items that are lost beyond the edges of the screen back to the centre."), CommandCategories::editing, 0); result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr); result.defaultKeypresses.add (KeyPress ('m', cmd, 0)); break; case JucerCommandIDs::zoomIn: - result.setInfo (TRANS("Zoom in"), TRANS("Zooms in on the current component."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Zoom in"), TRANS ("Zooms in on the current component."), CommandCategories::editing, 0); result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr); result.defaultKeypresses.add (KeyPress (']', cmd, 0)); break; case JucerCommandIDs::zoomOut: - result.setInfo (TRANS("Zoom out"), TRANS("Zooms out on the current component."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Zoom out"), TRANS ("Zooms out on the current component."), CommandCategories::editing, 0); result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr); result.defaultKeypresses.add (KeyPress ('[', cmd, 0)); break; case JucerCommandIDs::zoomNormal: - result.setInfo (TRANS("Zoom to 100%"), TRANS("Restores the zoom level to normal."), CommandCategories::editing, 0); + result.setInfo (TRANS ("Zoom to 100%"), TRANS ("Restores the zoom level to normal."), CommandCategories::editing, 0); result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr); result.defaultKeypresses.add (KeyPress ('1', cmd, 0)); break; case JucerCommandIDs::spaceBarDrag: - result.setInfo (TRANS("Scroll while dragging mouse"), TRANS("When held down, this key lets you scroll around by dragging with the mouse."), + result.setInfo (TRANS ("Scroll while dragging mouse"), TRANS ("When held down, this key lets you scroll around by dragging with the mouse."), CommandCategories::view, ApplicationCommandInfo::wantsKeyUpDownCallbacks); result.setActive (currentPaintRoutine != nullptr || currentLayout != nullptr); result.defaultKeypresses.add (KeyPress (KeyPress::spaceKey, 0, 0)); @@ -863,9 +863,9 @@ void JucerDocumentEditor::getCommandInfo (const CommandID commandID, Application currentAmount = 33; result.setInfo (commandID == JucerCommandIDs::compOverlay0 - ? TRANS("No component overlay") - : TRANS("Overlay with opacity of 123%").replace ("123", String (amount)), - TRANS("Changes the opacity of the components that are shown over the top of the graphics editor."), + ? TRANS ("No component overlay") + : TRANS ("Overlay with opacity of 123%").replace ("123", String (amount)), + TRANS ("Changes the opacity of the components that are shown over the top of the graphics editor."), CommandCategories::view, 0); result.setActive (currentPaintRoutine != nullptr && document->getComponentLayout() != nullptr); result.setTicked (amount == currentAmount); diff --git a/extras/Projucer/Source/ComponentEditor/UI/jucer_TestComponent.cpp b/extras/Projucer/Source/ComponentEditor/UI/jucer_TestComponent.cpp index 5a9905fd8b..dae00133ee 100644 --- a/extras/Projucer/Source/ComponentEditor/UI/jucer_TestComponent.cpp +++ b/extras/Projucer/Source/ComponentEditor/UI/jucer_TestComponent.cpp @@ -54,7 +54,7 @@ TestComponent::~TestComponent() void TestComponent::reloadAll() { for (int i = testComponents.size(); --i >= 0;) - testComponents.getUnchecked(i)->reload(); + testComponents.getUnchecked (i)->reload(); } void TestComponent::reload() diff --git a/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp b/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp index e931aa57c3..94bdfbf00d 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_ComponentLayout.cpp @@ -248,7 +248,7 @@ void ComponentLayout::copySelectedToClipboard() for (int i = 0; i < components.size(); ++i) { - auto c = components.getUnchecked(i); + auto c = components.getUnchecked (i); if (selected.isSelected (c)) { @@ -310,7 +310,7 @@ void ComponentLayout::selectedToFront() const SelectedItemSet temp (selected); for (int i = temp.getNumSelected(); --i >= 0;) - componentToFront (temp.getSelectedItem(i), true); + componentToFront (temp.getSelectedItem (i), true); } void ComponentLayout::selectedToBack() @@ -318,7 +318,7 @@ void ComponentLayout::selectedToBack() const SelectedItemSet temp (selected); for (int i = 0; i < temp.getNumSelected(); ++i) - componentToBack (temp.getSelectedItem(i), true); + componentToBack (temp.getSelectedItem (i), true); } void ComponentLayout::alignTop() @@ -457,8 +457,8 @@ Component* ComponentLayout::addComponentFromXml (const XmlElement& xml, const bo Component* ComponentLayout::findComponentWithId (const int64 componentId) const { for (int i = 0; i < components.size(); ++i) - if (ComponentTypeHandler::getComponentId (components.getUnchecked(i)) == componentId) - return components.getUnchecked(i); + if (ComponentTypeHandler::getComponentId (components.getUnchecked (i)) == componentId) + return components.getUnchecked (i); return nullptr; } @@ -626,7 +626,7 @@ public: newBounds (bounds), oldBounds (comp->getBounds()), newProps (props), - oldProps(comp->getProperties()) + oldProps (comp->getProperties()) { } @@ -839,7 +839,7 @@ void ComponentLayout::stretchSelectedComps (int dw, int dh, bool allowSnap) void ComponentLayout::fillInGeneratedCode (GeneratedCode& code) const { for (int i = 0; i < components.size(); ++i) - if (Component* const comp = components.getUnchecked(i)) + if (Component* const comp = components.getUnchecked (i)) if (ComponentTypeHandler* const type = ComponentTypeHandler::getHandlerFor (*comp)) type->fillInGeneratedCode (comp, code); } diff --git a/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp b/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp index 756f9ca235..b4a0e960c3 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_GeneratedCode.cpp @@ -59,7 +59,7 @@ String& GeneratedCode::getCallbackCode (const String& requiredParentClass, for (int i = callbacks.size(); --i >= 0;) { - CallbackMethod* const cm = callbacks.getUnchecked(i); + CallbackMethod* const cm = callbacks.getUnchecked (i); if (cm->requiredParentClass == parentClass && cm->returnType == returnType @@ -81,7 +81,7 @@ void GeneratedCode::removeCallback (const String& returnType, const String& prot { for (int i = callbacks.size(); --i >= 0;) { - CallbackMethod* const cm = callbacks.getUnchecked(i); + CallbackMethod* const cm = callbacks.getUnchecked (i); if (cm->returnType == returnType && cm->prototype == prototype) callbacks.remove (i); @@ -104,7 +104,7 @@ StringArray GeneratedCode::getExtraParentClasses() const for (int i = 0; i < callbacks.size(); ++i) { - CallbackMethod* const cm = callbacks.getUnchecked(i); + CallbackMethod* const cm = callbacks.getUnchecked (i); s.add (cm->requiredParentClass); } @@ -117,7 +117,7 @@ String GeneratedCode::getCallbackDeclarations() const for (int i = 0; i < callbacks.size(); ++i) { - CallbackMethod* const cm = callbacks.getUnchecked(i); + CallbackMethod* const cm = callbacks.getUnchecked (i); s << cm->returnType << " " << cm->prototype << " override;\n"; } @@ -131,7 +131,7 @@ String GeneratedCode::getCallbackDefinitions() const for (int i = 0; i < callbacks.size(); ++i) { - CallbackMethod* const cm = callbacks.getUnchecked(i); + CallbackMethod* const cm = callbacks.getUnchecked (i); const String userCodeBlockName ("User" + build_tools::makeValidIdentifier (cm->prototype.upToFirstOccurrenceOf ("(", false, false), @@ -217,7 +217,7 @@ static String getIncludeFileCode (const Array& files, const File& targetFi String s; for (int i = 0; i < files.size(); ++i) - s << CodeHelpers::createIncludeStatement (files.getReference(i), targetFile) << newLine; + s << CodeHelpers::createIncludeStatement (files.getReference (i), targetFile) << newLine; return s; } diff --git a/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp b/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp index bc575e1bb1..c26586d0f7 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp +++ b/extras/Projucer/Source/ComponentEditor/jucer_PaintRoutine.cpp @@ -361,7 +361,7 @@ void PaintRoutine::selectedToFront() const SelectedItemSet temp (selectedElements); for (int i = temp.getNumSelected(); --i >= 0;) - elementToFront (temp.getSelectedItem(i), true); + elementToFront (temp.getSelectedItem (i), true); } void PaintRoutine::selectedToBack() @@ -369,7 +369,7 @@ void PaintRoutine::selectedToBack() const SelectedItemSet temp (selectedElements); for (int i = 0; i < temp.getNumSelected(); ++i) - elementToBack (temp.getSelectedItem(i), true); + elementToBack (temp.getSelectedItem (i), true); } void PaintRoutine::alignTop() diff --git a/extras/Projucer/Source/ComponentEditor/jucer_UtilityFunctions.h b/extras/Projucer/Source/ComponentEditor/jucer_UtilityFunctions.h index 3fe3752033..dad3035670 100644 --- a/extras/Projucer/Source/ComponentEditor/jucer_UtilityFunctions.h +++ b/extras/Projucer/Source/ComponentEditor/jucer_UtilityFunctions.h @@ -64,7 +64,7 @@ inline String quotedString (const String& s, bool wrapInTransMacro) String lit (CodeHelpers::stringLiteral (s)); if (wrapInTransMacro && lit.startsWithChar ('"')) - return "TRANS(" + lit + ")"; + return "TRANS (" + lit + ")"; return lit; } diff --git a/extras/Projucer/Source/Project/Modules/jucer_AvailableModulesList.h b/extras/Projucer/Source/Project/Modules/jucer_AvailableModulesList.h index e174ee24ec..d359c665d2 100644 --- a/extras/Projucer/Source/Project/Modules/jucer_AvailableModulesList.h +++ b/extras/Projucer/Source/Project/Modules/jucer_AvailableModulesList.h @@ -157,7 +157,7 @@ private: if (job->shouldExit()) return; - pathsToCheck.push({ iter.getFile(), path.depth + 1 }); + pathsToCheck.push ({ iter.getFile(), path.depth + 1 }); } } } diff --git a/extras/Projucer/Source/Project/Modules/jucer_Modules.cpp b/extras/Projucer/Source/Project/Modules/jucer_Modules.cpp index eb74086897..b588bdc57f 100644 --- a/extras/Projucer/Source/Project/Modules/jucer_Modules.cpp +++ b/extras/Projucer/Source/Project/Modules/jucer_Modules.cpp @@ -712,7 +712,7 @@ void EnabledModulesList::removeModule (String moduleID) // must be pass-by-value const ScopedLock sl (stateLock); for (auto i = state.getNumChildren(); --i >= 0;) - if (state.getChild(i) [Ids::ID] == moduleID) + if (state.getChild (i) [Ids::ID] == moduleID) state.removeChild (i, getUndoManager()); } diff --git a/extras/Projucer/Source/Project/UI/Sidebar/jucer_FileTreeItems.h b/extras/Projucer/Source/Project/UI/Sidebar/jucer_FileTreeItems.h index 1c8f7a1a4c..d180d39195 100644 --- a/extras/Projucer/Source/Project/UI/Sidebar/jucer_FileTreeItems.h +++ b/extras/Projucer/Source/Project/UI/Sidebar/jucer_FileTreeItems.h @@ -101,7 +101,7 @@ public: for (auto i = fsToTrash.size(); --i >= 0;) { - auto f = fsToTrash.getUnchecked(i); + auto f = fsToTrash.getUnchecked (i); om.closeFileWithoutSaving (f); @@ -133,7 +133,7 @@ public: String fileList; auto maxFilesToList = 10; for (auto i = jmin (maxFilesToList, filesToTrash.size()); --i >= 0;) - fileList << filesToTrash.getUnchecked(i).getFullPathName() << "\n"; + fileList << filesToTrash.getUnchecked (i).getFullPathName() << "\n"; if (filesToTrash.size() > maxFilesToList) fileList << "\n...plus " << (filesToTrash.size() - maxFilesToList) << " more files..."; @@ -187,7 +187,7 @@ public: StringArray files; for (int i = 0; i < fc.getResults().size(); ++i) - files.add (fc.getResults().getReference(i).getFullPathName()); + files.add (fc.getResults().getReference (i).getFullPathName()); addFilesRetainingSortOrder (files); }); @@ -250,7 +250,7 @@ public: for (auto i = getNumSubItems(); --i >= 0;) { - if (auto* pg = dynamic_cast (getSubItem(i))) + if (auto* pg = dynamic_cast (getSubItem (i))) if (auto* found = pg->findTreeViewItem (itemToFind)) return found; } @@ -275,7 +275,7 @@ public: void addSubItems() override { for (int i = 0; i < item.getNumChildren(); ++i) - if (auto* p = createSubItem (item.getChild(i))) + if (auto* p = createSubItem (item.getChild (i))) addSubItem (p); } @@ -423,7 +423,7 @@ protected: { for (auto i = selectedNodes.size(); --i >= 0;) { - auto* n = selectedNodes.getUnchecked(i); + auto* n = selectedNodes.getUnchecked (i); if (destNode == *n || destNode.state.isAChildOf (n->state)) // Check for recursion. return; @@ -435,11 +435,11 @@ protected: // Don't include any nodes that are children of other selected nodes.. for (auto i = selectedNodes.size(); --i >= 0;) { - auto* n = selectedNodes.getUnchecked(i); + auto* n = selectedNodes.getUnchecked (i); for (auto j = selectedNodes.size(); --j >= 0;) { - if (j != i && n->state.isAChildOf (selectedNodes.getUnchecked(j)->state)) + if (j != i && n->state.isAChildOf (selectedNodes.getUnchecked (j)->state)) { selectedNodes.remove (i); break; @@ -450,7 +450,7 @@ protected: // Remove and re-insert them one at a time.. for (int i = 0; i < selectedNodes.size(); ++i) { - auto* selectedNode = selectedNodes.getUnchecked(i); + auto* selectedNode = selectedNodes.getUnchecked (i); if (selectedNode->state.getParent() == destNode.state && indexOfNode (destNode.state, selectedNode->state) < insertIndex) @@ -672,7 +672,7 @@ public: bool acceptsDragItems (const OwnedArray& selectedNodes) override { for (auto i = selectedNodes.size(); --i >= 0;) - if (item.canContain (*selectedNodes.getUnchecked(i))) + if (item.canContain (*selectedNodes.getUnchecked (i))) return true; return false; @@ -701,7 +701,7 @@ public: void checkFileStatus() override { for (int i = 0; i < getNumSubItems(); ++i) - if (auto* p = dynamic_cast (getSubItem(i))) + if (auto* p = dynamic_cast (getSubItem (i))) p->checkFileStatus(); } diff --git a/extras/Projucer/Source/Project/jucer_Project.cpp b/extras/Projucer/Source/Project/jucer_Project.cpp index eeaeb6563c..be7c103aad 100644 --- a/extras/Projucer/Source/Project/jucer_Project.cpp +++ b/extras/Projucer/Source/Project/jucer_Project.cpp @@ -340,7 +340,7 @@ void Project::initialiseAudioPluginValues() pluginFormatsValue.referTo (projectRoot, Ids::pluginFormats, getUndoManager(), Array (Ids::buildVST3.toString(), Ids::buildAU.toString(), Ids::buildStandalone.toString()), ","); - pluginCharacteristicsValue.referTo (projectRoot, Ids::pluginCharacteristicsValue, getUndoManager(), Array (), ","); + pluginCharacteristicsValue.referTo (projectRoot, Ids::pluginCharacteristicsValue, getUndoManager(), Array(), ","); pluginNameValue.referTo (projectRoot, Ids::pluginName, getUndoManager(), getProjectNameString()); pluginDescriptionValue.referTo (projectRoot, Ids::pluginDesc, getUndoManager(), getProjectNameString()); @@ -1415,8 +1415,8 @@ void Project::createPropertyEditors (PropertyListBuilder& props) for (int i = 0; i < types.size(); ++i) { - projectTypeNames.add (types.getUnchecked(i)->getDescription()); - projectTypeCodes.add (types.getUnchecked(i)->getType()); + projectTypeNames.add (types.getUnchecked (i)->getDescription()); + projectTypeCodes.add (types.getUnchecked (i)->getType()); } props.add (new ChoicePropertyComponent (projectTypeValue, "Project Type", projectTypeNames, projectTypeCodes), @@ -1698,7 +1698,7 @@ Project::Item Project::Item::findItemWithID (const String& targetId) const { for (auto i = getNumChildren(); --i >= 0;) { - auto found = getChild(i).findItemWithID (targetId); + auto found = getChild (i).findItemWithID (targetId); if (found.isValid()) return found; @@ -1819,7 +1819,7 @@ Project::Item Project::Item::findItemForFile (const File& file) const { for (auto i = getNumChildren(); --i >= 0;) { - auto found = getChild(i).findItemForFile (file); + auto found = getChild (i).findItemForFile (file); if (found.isValid()) return found; @@ -1836,7 +1836,7 @@ File Project::Item::determineGroupFolder() const for (int i = 0; i < getNumChildren(); ++i) { - f = getChild(i).getFile(); + f = getChild (i).getFile(); if (f.exists()) return f.getParentDirectory(); @@ -1873,7 +1873,7 @@ void Project::Item::initialiseMissingProperties() else if (isGroup()) { for (auto i = getNumChildren(); --i >= 0;) - getChild(i).initialiseMissingProperties(); + getChild (i).initialiseMissingProperties(); } } @@ -1960,7 +1960,7 @@ void Project::Item::sortAlphabetically (bool keepGroupsAtStart, bool recursive) if (recursive) for (auto i = getNumChildren(); --i >= 0;) - getChild(i).sortAlphabetically (keepGroupsAtStart, true); + getChild (i).sortAlphabetically (keepGroupsAtStart, true); } Project::Item Project::Item::getOrCreateSubGroup (const String& name) @@ -2831,9 +2831,9 @@ StringPairArray Project::getAudioPluginFlags() const flags.set ("JucePlugin_VSTNumMidiOutputs", getVSTNumMIDIOutputsString()); flags.set ("JucePlugin_ARAContentTypes", String (getARAContentTypes())); flags.set ("JucePlugin_ARATransformationFlags", String (getARATransformationFlags())); - flags.set ("JucePlugin_ARAFactoryID", toStringLiteral(getARAFactoryIDString())); - flags.set ("JucePlugin_ARADocumentArchiveID", toStringLiteral(getARADocumentArchiveIDString())); - flags.set ("JucePlugin_ARACompatibleArchiveIDs", toStringLiteral(getARACompatibleArchiveIDStrings())); + flags.set ("JucePlugin_ARAFactoryID", toStringLiteral (getARAFactoryIDString())); + flags.set ("JucePlugin_ARADocumentArchiveID", toStringLiteral (getARADocumentArchiveIDString())); + flags.set ("JucePlugin_ARACompatibleArchiveIDs", toStringLiteral (getARACompatibleArchiveIDStrings())); { String plugInChannelConfig = getPluginChannelConfigsString(); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h index a89c0d6c6c..5f36f1839a 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Android.h @@ -537,7 +537,7 @@ private: if (! first) { - ProjectExporter::BuildConfiguration::Ptr config (getConfiguration(0)); + ProjectExporter::BuildConfiguration::Ptr config (getConfiguration (0)); if (config) { @@ -836,7 +836,7 @@ private: auto numConfigs = getNumConfigurations(); for (int i = 0; i < numConfigs; ++i) { - auto config = getConfiguration(i); + auto config = getConfiguration (i); if (config->isDebug()) numDebugConfigs++; @@ -954,7 +954,7 @@ private: return mo.toString(); } - void addModuleJavaFolderToSourceSet(StringArray& javaSourceSets, const File& source) const + void addModuleJavaFolderToSourceSet (StringArray& javaSourceSets, const File& source) const { if (source.isDirectory()) { @@ -1493,7 +1493,7 @@ private: Array>& extraCompilerFlags) const { for (int i = 0; i < getAllGroups().size(); ++i) - addCompileUnits (getAllGroups().getReference(i), mo, excludeFromBuild, extraCompilerFlags); + addCompileUnits (getAllGroups().getReference (i), mo, excludeFromBuild, extraCompilerFlags); } //============================================================================== diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h index d259fbad06..5180ac6981 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_CodeBlocks.h @@ -895,7 +895,7 @@ private: if (projectItem.isGroup()) { for (int i = 0; i < projectItem.getNumChildren(); ++i) - addCompileUnits (projectItem.getChild(i), xml); + addCompileUnits (projectItem.getChild (i), xml); } else if (projectItem.shouldBeAddedToTargetProject() && projectItem.shouldBeAddedToTargetExporter (*this)) { @@ -947,7 +947,7 @@ private: } for (int i = 0; i < getAllGroups().size(); ++i) - addCompileUnits (getAllGroups().getReference(i), xml); + addCompileUnits (getAllGroups().getReference (i), xml); if (hasResourceFile()) { diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ResourceFile.cpp b/extras/Projucer/Source/ProjectSaving/jucer_ResourceFile.cpp index 534296a7ea..309f3b168d 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ResourceFile.cpp +++ b/extras/Projucer/Source/ProjectSaving/jucer_ResourceFile.cpp @@ -42,7 +42,7 @@ void JucerResourceFile::addResourcesFromProjectItem (const Project::Item& projec if (projectItem.isGroup()) { for (int i = 0; i < projectItem.getNumChildren(); ++i) - addResourcesFromProjectItem (projectItem.getChild(i)); + addResourcesFromProjectItem (projectItem.getChild (i)); } else { diff --git a/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp b/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp index d0383bcb4e..ef2ba44f9d 100644 --- a/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp +++ b/extras/Projucer/Source/Settings/jucer_AppearanceSettings.cpp @@ -39,7 +39,7 @@ AppearanceSettings::AppearanceSettings (bool updateAppWhenChanged) for (int i = cs.types.size(); --i >= 0;) { - auto& t = cs.types.getReference(i); + auto& t = cs.types.getReference (i); getColourValue (t.name) = t.colour.toString(); } @@ -86,7 +86,7 @@ StringArray AppearanceSettings::getPresetSchemes() { StringArray s; for (int i = 0; i < presetSchemeFiles.size(); ++i) - s.add (presetSchemeFiles.getReference(i).getFileNameWithoutExtension()); + s.add (presetSchemeFiles.getReference (i).getFileNameWithoutExtension()); return s; } @@ -165,7 +165,7 @@ void AppearanceSettings::applyToCodeEditor (CodeEditorComponent& editor) const for (int i = cs.types.size(); --i >= 0;) { - CodeEditorComponent::ColourScheme::TokenType& t = cs.types.getReference(i); + CodeEditorComponent::ColourScheme::TokenType& t = cs.types.getReference (i); getColour (t.name, t.colour); } diff --git a/extras/Projucer/Source/Settings/jucer_StoredSettings.cpp b/extras/Projucer/Source/Settings/jucer_StoredSettings.cpp index 5d1499b3f5..ba1a2abc9c 100644 --- a/extras/Projucer/Source/Settings/jucer_StoredSettings.cpp +++ b/extras/Projucer/Source/Settings/jucer_StoredSettings.cpp @@ -80,7 +80,7 @@ PropertiesFile& StoredSettings::getProjectProperties (const String& projectUID) for (auto i = propertyFiles.size(); --i >= 0;) { - auto* const props = propertyFiles.getUnchecked(i); + auto* const props = propertyFiles.getUnchecked (i); if (props->getFile().getFileNameWithoutExtension() == filename) return *props; } @@ -127,7 +127,7 @@ void StoredSettings::flush() saveSwatchColours(); for (auto i = propertyFiles.size(); --i >= 0;) - propertyFiles.getUnchecked(i)->saveIfNeeded(); + propertyFiles.getUnchecked (i)->saveIfNeeded(); } void StoredSettings::reload() @@ -166,7 +166,7 @@ void StoredSettings::setLastProjects (const Array& files) { StringArray s; for (int i = 0; i < files.size(); ++i) - s.add (files.getReference(i).getFullPathName()); + s.add (files.getReference (i).getFullPathName()); getGlobalProperties().setValue ("lastProjects", s.joinIntoString ("|")); } @@ -233,7 +233,7 @@ void StoredSettings::saveSwatchColours() auto& props = getGlobalProperties(); for (auto i = 0; i < swatchColours.size(); ++i) - props.setValue ("swatchColour" + String (i), swatchColours.getReference(i).toString()); + props.setValue ("swatchColour" + String (i), swatchColours.getReference (i).toString()); } StoredSettings::ColourSelectorWithSwatches::ColourSelectorWithSwatches() {} diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp b/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp index 2811910695..aa37ebc8f4 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp +++ b/extras/Projucer/Source/Utility/Helpers/jucer_CodeHelpers.cpp @@ -132,12 +132,12 @@ namespace CodeHelpers } for (int i = 0; i < lines.size(); ++i) - lines.getReference(i) = CppTokeniserFunctions::addEscapeChars (lines.getReference(i)); + lines.getReference (i) = CppTokeniserFunctions::addEscapeChars (lines.getReference (i)); lines.removeEmptyStrings(); for (int i = 0; i < lines.size(); ++i) - lines.getReference(i) = "\"" + lines.getReference(i) + "\""; + lines.getReference (i) = "\"" + lines.getReference (i) + "\""; String result (lines.joinIntoString (newLine)); diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_Colours.h b/extras/Projucer/Source/Utility/Helpers/jucer_Colours.h index 2ec4020010..9c4d6815ed 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_Colours.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_Colours.h @@ -23,140 +23,140 @@ ============================================================================== */ -COL(black) -COL(white) -COL(blue) -COL(grey) -COL(green) -COL(red) -COL(yellow) -COL(aliceblue) -COL(antiquewhite) -COL(aqua) -COL(aquamarine) -COL(azure) -COL(beige) -COL(bisque) -COL(blanchedalmond) -COL(blueviolet) -COL(brown) -COL(burlywood) -COL(cadetblue) -COL(chartreuse) -COL(chocolate) -COL(coral) -COL(cornflowerblue) -COL(cornsilk) -COL(crimson) -COL(cyan) -COL(darkblue) -COL(darkcyan) -COL(darkgoldenrod) -COL(darkgrey) -COL(darkgreen) -COL(darkkhaki) -COL(darkmagenta) -COL(darkolivegreen) -COL(darkorange) -COL(darkorchid) -COL(darkred) -COL(darksalmon) -COL(darkseagreen) -COL(darkslateblue) -COL(darkslategrey) -COL(darkturquoise) -COL(darkviolet) -COL(deeppink) -COL(deepskyblue) -COL(dimgrey) -COL(dodgerblue) -COL(firebrick) -COL(floralwhite) -COL(forestgreen) -COL(fuchsia) -COL(gainsboro) -COL(gold) -COL(goldenrod) -COL(greenyellow) -COL(honeydew) -COL(hotpink) -COL(indianred) -COL(indigo) -COL(ivory) -COL(khaki) -COL(lavender) -COL(lavenderblush) -COL(lemonchiffon) -COL(lightblue) -COL(lightcoral) -COL(lightcyan) -COL(lightgoldenrodyellow) -COL(lightgreen) -COL(lightgrey) -COL(lightpink) -COL(lightsalmon) -COL(lightseagreen) -COL(lightskyblue) -COL(lightslategrey) -COL(lightsteelblue) -COL(lightyellow) -COL(lime) -COL(limegreen) -COL(linen) -COL(magenta) -COL(maroon) -COL(mediumaquamarine) -COL(mediumblue) -COL(mediumorchid) -COL(mediumpurple) -COL(mediumseagreen) -COL(mediumslateblue) -COL(mediumspringgreen) -COL(mediumturquoise) -COL(mediumvioletred) -COL(midnightblue) -COL(mintcream) -COL(mistyrose) -COL(navajowhite) -COL(navy) -COL(oldlace) -COL(olive) -COL(olivedrab) -COL(orange) -COL(orangered) -COL(orchid) -COL(palegoldenrod) -COL(palegreen) -COL(paleturquoise) -COL(palevioletred) -COL(papayawhip) -COL(peachpuff) -COL(peru) -COL(pink) -COL(plum) -COL(powderblue) -COL(purple) -COL(rosybrown) -COL(royalblue) -COL(saddlebrown) -COL(salmon) -COL(sandybrown) -COL(seagreen) -COL(seashell) -COL(sienna) -COL(silver) -COL(skyblue) -COL(slateblue) -COL(slategrey) -COL(snow) -COL(springgreen) -COL(steelblue) -COL(tan) -COL(teal) -COL(thistle) -COL(tomato) -COL(turquoise) -COL(violet) -COL(wheat) -COL(whitesmoke) -COL(yellowgreen) +COL (black) +COL (white) +COL (blue) +COL (grey) +COL (green) +COL (red) +COL (yellow) +COL (aliceblue) +COL (antiquewhite) +COL (aqua) +COL (aquamarine) +COL (azure) +COL (beige) +COL (bisque) +COL (blanchedalmond) +COL (blueviolet) +COL (brown) +COL (burlywood) +COL (cadetblue) +COL (chartreuse) +COL (chocolate) +COL (coral) +COL (cornflowerblue) +COL (cornsilk) +COL (crimson) +COL (cyan) +COL (darkblue) +COL (darkcyan) +COL (darkgoldenrod) +COL (darkgrey) +COL (darkgreen) +COL (darkkhaki) +COL (darkmagenta) +COL (darkolivegreen) +COL (darkorange) +COL (darkorchid) +COL (darkred) +COL (darksalmon) +COL (darkseagreen) +COL (darkslateblue) +COL (darkslategrey) +COL (darkturquoise) +COL (darkviolet) +COL (deeppink) +COL (deepskyblue) +COL (dimgrey) +COL (dodgerblue) +COL (firebrick) +COL (floralwhite) +COL (forestgreen) +COL (fuchsia) +COL (gainsboro) +COL (gold) +COL (goldenrod) +COL (greenyellow) +COL (honeydew) +COL (hotpink) +COL (indianred) +COL (indigo) +COL (ivory) +COL (khaki) +COL (lavender) +COL (lavenderblush) +COL (lemonchiffon) +COL (lightblue) +COL (lightcoral) +COL (lightcyan) +COL (lightgoldenrodyellow) +COL (lightgreen) +COL (lightgrey) +COL (lightpink) +COL (lightsalmon) +COL (lightseagreen) +COL (lightskyblue) +COL (lightslategrey) +COL (lightsteelblue) +COL (lightyellow) +COL (lime) +COL (limegreen) +COL (linen) +COL (magenta) +COL (maroon) +COL (mediumaquamarine) +COL (mediumblue) +COL (mediumorchid) +COL (mediumpurple) +COL (mediumseagreen) +COL (mediumslateblue) +COL (mediumspringgreen) +COL (mediumturquoise) +COL (mediumvioletred) +COL (midnightblue) +COL (mintcream) +COL (mistyrose) +COL (navajowhite) +COL (navy) +COL (oldlace) +COL (olive) +COL (olivedrab) +COL (orange) +COL (orangered) +COL (orchid) +COL (palegoldenrod) +COL (palegreen) +COL (paleturquoise) +COL (palevioletred) +COL (papayawhip) +COL (peachpuff) +COL (peru) +COL (pink) +COL (plum) +COL (powderblue) +COL (purple) +COL (rosybrown) +COL (royalblue) +COL (saddlebrown) +COL (salmon) +COL (sandybrown) +COL (seagreen) +COL (seashell) +COL (sienna) +COL (silver) +COL (skyblue) +COL (slateblue) +COL (slategrey) +COL (snow) +COL (springgreen) +COL (steelblue) +COL (tan) +COL (teal) +COL (thistle) +COL (tomato) +COL (turquoise) +COL (violet) +COL (wheat) +COL (whitesmoke) +COL (yellowgreen) diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h b/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h index 9399a59d73..2aeac0fb6e 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_MiscUtilities.h @@ -110,7 +110,7 @@ struct PropertyListBuilder void setPreferredHeight (int height) { for (int j = components.size(); --j >= 0;) - components.getUnchecked(j)->setPreferredHeight (height); + components.getUnchecked (j)->setPreferredHeight (height); } Array components; diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_NewFileWizard.cpp b/extras/Projucer/Source/Utility/Helpers/jucer_NewFileWizard.cpp index f076083a3a..fdc1465a9d 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_NewFileWizard.cpp +++ b/extras/Projucer/Source/Utility/Helpers/jucer_NewFileWizard.cpp @@ -276,7 +276,7 @@ NewFileWizard::~NewFileWizard() void NewFileWizard::addWizardsToMenu (PopupMenu& m) const { for (int i = 0; i < wizards.size(); ++i) - m.addItem (menuBaseID + i, "Add New " + wizards.getUnchecked(i)->getName() + "..."); + m.addItem (menuBaseID + i, "Add New " + wizards.getUnchecked (i)->getName() + "..."); } bool NewFileWizard::runWizardFromMenu (int chosenMenuItemID, Project& project, const Project::Item& projectGroupToAddTo) const diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_TranslationHelpers.h b/extras/Projucer/Source/Utility/Helpers/jucer_TranslationHelpers.h index 8795a09201..f2aea40c1a 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_TranslationHelpers.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_TranslationHelpers.h @@ -173,7 +173,7 @@ struct TranslationHelpers const auto file = i.getFile(); if (file.hasFileExtension (sourceOrHeaderFileExtensions)) - scanFileForTranslations(strings, file); + scanFileForTranslations (strings, file); } } @@ -186,13 +186,13 @@ struct TranslationHelpers for (int j = 0; j < modules.size(); ++j) { - const File localFolder (modules.getUnchecked(j)->getFolder()); + const File localFolder (modules.getUnchecked (j)->getFolder()); Array files; - modules.getUnchecked(j)->findBrowseableFiles (localFolder, files); + modules.getUnchecked (j)->findBrowseableFiles (localFolder, files); for (int i = 0; i < files.size(); ++i) - scanFileForTranslations (strings, files.getReference(i)); + scanFileForTranslations (strings, files.getReference (i)); } } diff --git a/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp b/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp index ceb641a416..f43d4f51a9 100644 --- a/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp +++ b/extras/Projucer/Source/Utility/UI/jucer_ProjucerLookAndFeel.cpp @@ -512,7 +512,7 @@ void ProjucerLookAndFeel::setupColours() setColour (BooleanPropertyComponent::outlineColourId, Colours::transparentBlack); setColour (BooleanPropertyComponent::backgroundColourId, findColour (widgetBackgroundColourId)); setColour (ToggleButton::tickDisabledColourId, Colour (0xffa9a9a9)); - setColour (ToggleButton::tickColourId, findColour (defaultButtonBackgroundColourId).withMultipliedBrightness(1.3f)); + setColour (ToggleButton::tickColourId, findColour (defaultButtonBackgroundColourId).withMultipliedBrightness (1.3f)); setColour (CodeEditorComponent::backgroundColourId, findColour (secondaryBackgroundColourId)); setColour (CodeEditorComponent::lineNumberTextId, findColour (codeEditorLineNumberColourId)); setColour (CodeEditorComponent::lineNumberBackgroundId, findColour (backgroundColourId)); diff --git a/extras/Projucer/Source/Utility/UI/jucer_SlidingPanelComponent.cpp b/extras/Projucer/Source/Utility/UI/jucer_SlidingPanelComponent.cpp index 4edf63f585..cad18e7b08 100644 --- a/extras/Projucer/Source/Utility/UI/jucer_SlidingPanelComponent.cpp +++ b/extras/Projucer/Source/Utility/UI/jucer_SlidingPanelComponent.cpp @@ -110,9 +110,9 @@ void SlidingPanelComponent::resized() .reduced ((content.getWidth() - dotSize * getNumTabs()) / 2, 10); for (int i = 0; i < getNumTabs(); ++i) - pages.getUnchecked(i)->dotButton->setBounds (dotHolder.removeFromLeft (dotSize)); + pages.getUnchecked (i)->dotButton->setBounds (dotHolder.removeFromLeft (dotSize)); for (int i = pages.size(); --i >= 0;) - if (Component* c = pages.getUnchecked(i)->content) + if (Component* c = pages.getUnchecked (i)->content) c->setBounds (content.translated (i * content.getWidth(), 0)); } diff --git a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp index 7f053d318d..eb47b3f84e 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioChannelSet.cpp @@ -46,105 +46,105 @@ String AudioChannelSet::getChannelTypeName (AudioChannelSet::ChannelType type) switch (type) { - case left: return NEEDS_TRANS("Left"); - case right: return NEEDS_TRANS("Right"); - case centre: return NEEDS_TRANS("Centre"); - case LFE: return NEEDS_TRANS("LFE"); - case leftSurround: return NEEDS_TRANS("Left Surround"); - case rightSurround: return NEEDS_TRANS("Right Surround"); - case leftCentre: return NEEDS_TRANS("Left Centre"); - case rightCentre: return NEEDS_TRANS("Right Centre"); - case centreSurround: return NEEDS_TRANS("Centre Surround"); - case leftSurroundRear: return NEEDS_TRANS("Left Surround Rear"); - case rightSurroundRear: return NEEDS_TRANS("Right Surround Rear"); - case topMiddle: return NEEDS_TRANS("Top Middle"); - case topFrontLeft: return NEEDS_TRANS("Top Front Left"); - case topFrontCentre: return NEEDS_TRANS("Top Front Centre"); - case topFrontRight: return NEEDS_TRANS("Top Front Right"); - case topRearLeft: return NEEDS_TRANS("Top Rear Left"); - case topRearCentre: return NEEDS_TRANS("Top Rear Centre"); - case topRearRight: return NEEDS_TRANS("Top Rear Right"); - case wideLeft: return NEEDS_TRANS("Wide Left"); - case wideRight: return NEEDS_TRANS("Wide Right"); - case LFE2: return NEEDS_TRANS("LFE 2"); - case leftSurroundSide: return NEEDS_TRANS("Left Surround Side"); - case rightSurroundSide: return NEEDS_TRANS("Right Surround Side"); - case ambisonicW: return NEEDS_TRANS("Ambisonic W"); - case ambisonicX: return NEEDS_TRANS("Ambisonic X"); - case ambisonicY: return NEEDS_TRANS("Ambisonic Y"); - case ambisonicZ: return NEEDS_TRANS("Ambisonic Z"); - case topSideLeft: return NEEDS_TRANS("Top Side Left"); - case topSideRight: return NEEDS_TRANS("Top Side Right"); - case ambisonicACN4: return NEEDS_TRANS("Ambisonic 4"); - case ambisonicACN5: return NEEDS_TRANS("Ambisonic 5"); - case ambisonicACN6: return NEEDS_TRANS("Ambisonic 6"); - case ambisonicACN7: return NEEDS_TRANS("Ambisonic 7"); - case ambisonicACN8: return NEEDS_TRANS("Ambisonic 8"); - case ambisonicACN9: return NEEDS_TRANS("Ambisonic 9"); - case ambisonicACN10: return NEEDS_TRANS("Ambisonic 10"); - case ambisonicACN11: return NEEDS_TRANS("Ambisonic 11"); - case ambisonicACN12: return NEEDS_TRANS("Ambisonic 12"); - case ambisonicACN13: return NEEDS_TRANS("Ambisonic 13"); - case ambisonicACN14: return NEEDS_TRANS("Ambisonic 14"); - case ambisonicACN15: return NEEDS_TRANS("Ambisonic 15"); - case ambisonicACN16: return NEEDS_TRANS("Ambisonic 16"); - case ambisonicACN17: return NEEDS_TRANS("Ambisonic 17"); - case ambisonicACN18: return NEEDS_TRANS("Ambisonic 18"); - case ambisonicACN19: return NEEDS_TRANS("Ambisonic 19"); - case ambisonicACN20: return NEEDS_TRANS("Ambisonic 20"); - case ambisonicACN21: return NEEDS_TRANS("Ambisonic 21"); - case ambisonicACN22: return NEEDS_TRANS("Ambisonic 22"); - case ambisonicACN23: return NEEDS_TRANS("Ambisonic 23"); - case ambisonicACN24: return NEEDS_TRANS("Ambisonic 24"); - case ambisonicACN25: return NEEDS_TRANS("Ambisonic 25"); - case ambisonicACN26: return NEEDS_TRANS("Ambisonic 26"); - case ambisonicACN27: return NEEDS_TRANS("Ambisonic 27"); - case ambisonicACN28: return NEEDS_TRANS("Ambisonic 28"); - case ambisonicACN29: return NEEDS_TRANS("Ambisonic 29"); - case ambisonicACN30: return NEEDS_TRANS("Ambisonic 30"); - case ambisonicACN31: return NEEDS_TRANS("Ambisonic 31"); - case ambisonicACN32: return NEEDS_TRANS("Ambisonic 32"); - case ambisonicACN33: return NEEDS_TRANS("Ambisonic 33"); - case ambisonicACN34: return NEEDS_TRANS("Ambisonic 34"); - case ambisonicACN35: return NEEDS_TRANS("Ambisonic 35"); - case ambisonicACN36: return NEEDS_TRANS("Ambisonic 36"); - case ambisonicACN37: return NEEDS_TRANS("Ambisonic 37"); - case ambisonicACN38: return NEEDS_TRANS("Ambisonic 38"); - case ambisonicACN39: return NEEDS_TRANS("Ambisonic 39"); - case ambisonicACN40: return NEEDS_TRANS("Ambisonic 40"); - case ambisonicACN41: return NEEDS_TRANS("Ambisonic 41"); - case ambisonicACN42: return NEEDS_TRANS("Ambisonic 42"); - case ambisonicACN43: return NEEDS_TRANS("Ambisonic 43"); - case ambisonicACN44: return NEEDS_TRANS("Ambisonic 44"); - case ambisonicACN45: return NEEDS_TRANS("Ambisonic 45"); - case ambisonicACN46: return NEEDS_TRANS("Ambisonic 46"); - case ambisonicACN47: return NEEDS_TRANS("Ambisonic 47"); - case ambisonicACN48: return NEEDS_TRANS("Ambisonic 48"); - case ambisonicACN49: return NEEDS_TRANS("Ambisonic 49"); - case ambisonicACN50: return NEEDS_TRANS("Ambisonic 50"); - case ambisonicACN51: return NEEDS_TRANS("Ambisonic 51"); - case ambisonicACN52: return NEEDS_TRANS("Ambisonic 52"); - case ambisonicACN53: return NEEDS_TRANS("Ambisonic 53"); - case ambisonicACN54: return NEEDS_TRANS("Ambisonic 54"); - case ambisonicACN55: return NEEDS_TRANS("Ambisonic 55"); - case ambisonicACN56: return NEEDS_TRANS("Ambisonic 56"); - case ambisonicACN57: return NEEDS_TRANS("Ambisonic 57"); - case ambisonicACN58: return NEEDS_TRANS("Ambisonic 58"); - case ambisonicACN59: return NEEDS_TRANS("Ambisonic 59"); - case ambisonicACN60: return NEEDS_TRANS("Ambisonic 60"); - case ambisonicACN61: return NEEDS_TRANS("Ambisonic 61"); - case ambisonicACN62: return NEEDS_TRANS("Ambisonic 62"); - case ambisonicACN63: return NEEDS_TRANS("Ambisonic 63"); - case bottomFrontLeft: return NEEDS_TRANS("Bottom Front Left"); - case bottomFrontCentre: return NEEDS_TRANS("Bottom Front Centre"); - case bottomFrontRight: return NEEDS_TRANS("Bottom Front Right"); - case proximityLeft: return NEEDS_TRANS("Proximity Left"); - case proximityRight: return NEEDS_TRANS("Proximity Right"); - case bottomSideLeft: return NEEDS_TRANS("Bottom Side Left"); - case bottomSideRight: return NEEDS_TRANS("Bottom Side Right"); - case bottomRearLeft: return NEEDS_TRANS("Bottom Rear Left"); - case bottomRearCentre: return NEEDS_TRANS("Bottom Rear Centre"); - case bottomRearRight: return NEEDS_TRANS("Bottom Rear Right"); + case left: return NEEDS_TRANS ("Left"); + case right: return NEEDS_TRANS ("Right"); + case centre: return NEEDS_TRANS ("Centre"); + case LFE: return NEEDS_TRANS ("LFE"); + case leftSurround: return NEEDS_TRANS ("Left Surround"); + case rightSurround: return NEEDS_TRANS ("Right Surround"); + case leftCentre: return NEEDS_TRANS ("Left Centre"); + case rightCentre: return NEEDS_TRANS ("Right Centre"); + case centreSurround: return NEEDS_TRANS ("Centre Surround"); + case leftSurroundRear: return NEEDS_TRANS ("Left Surround Rear"); + case rightSurroundRear: return NEEDS_TRANS ("Right Surround Rear"); + case topMiddle: return NEEDS_TRANS ("Top Middle"); + case topFrontLeft: return NEEDS_TRANS ("Top Front Left"); + case topFrontCentre: return NEEDS_TRANS ("Top Front Centre"); + case topFrontRight: return NEEDS_TRANS ("Top Front Right"); + case topRearLeft: return NEEDS_TRANS ("Top Rear Left"); + case topRearCentre: return NEEDS_TRANS ("Top Rear Centre"); + case topRearRight: return NEEDS_TRANS ("Top Rear Right"); + case wideLeft: return NEEDS_TRANS ("Wide Left"); + case wideRight: return NEEDS_TRANS ("Wide Right"); + case LFE2: return NEEDS_TRANS ("LFE 2"); + case leftSurroundSide: return NEEDS_TRANS ("Left Surround Side"); + case rightSurroundSide: return NEEDS_TRANS ("Right Surround Side"); + case ambisonicW: return NEEDS_TRANS ("Ambisonic W"); + case ambisonicX: return NEEDS_TRANS ("Ambisonic X"); + case ambisonicY: return NEEDS_TRANS ("Ambisonic Y"); + case ambisonicZ: return NEEDS_TRANS ("Ambisonic Z"); + case topSideLeft: return NEEDS_TRANS ("Top Side Left"); + case topSideRight: return NEEDS_TRANS ("Top Side Right"); + case ambisonicACN4: return NEEDS_TRANS ("Ambisonic 4"); + case ambisonicACN5: return NEEDS_TRANS ("Ambisonic 5"); + case ambisonicACN6: return NEEDS_TRANS ("Ambisonic 6"); + case ambisonicACN7: return NEEDS_TRANS ("Ambisonic 7"); + case ambisonicACN8: return NEEDS_TRANS ("Ambisonic 8"); + case ambisonicACN9: return NEEDS_TRANS ("Ambisonic 9"); + case ambisonicACN10: return NEEDS_TRANS ("Ambisonic 10"); + case ambisonicACN11: return NEEDS_TRANS ("Ambisonic 11"); + case ambisonicACN12: return NEEDS_TRANS ("Ambisonic 12"); + case ambisonicACN13: return NEEDS_TRANS ("Ambisonic 13"); + case ambisonicACN14: return NEEDS_TRANS ("Ambisonic 14"); + case ambisonicACN15: return NEEDS_TRANS ("Ambisonic 15"); + case ambisonicACN16: return NEEDS_TRANS ("Ambisonic 16"); + case ambisonicACN17: return NEEDS_TRANS ("Ambisonic 17"); + case ambisonicACN18: return NEEDS_TRANS ("Ambisonic 18"); + case ambisonicACN19: return NEEDS_TRANS ("Ambisonic 19"); + case ambisonicACN20: return NEEDS_TRANS ("Ambisonic 20"); + case ambisonicACN21: return NEEDS_TRANS ("Ambisonic 21"); + case ambisonicACN22: return NEEDS_TRANS ("Ambisonic 22"); + case ambisonicACN23: return NEEDS_TRANS ("Ambisonic 23"); + case ambisonicACN24: return NEEDS_TRANS ("Ambisonic 24"); + case ambisonicACN25: return NEEDS_TRANS ("Ambisonic 25"); + case ambisonicACN26: return NEEDS_TRANS ("Ambisonic 26"); + case ambisonicACN27: return NEEDS_TRANS ("Ambisonic 27"); + case ambisonicACN28: return NEEDS_TRANS ("Ambisonic 28"); + case ambisonicACN29: return NEEDS_TRANS ("Ambisonic 29"); + case ambisonicACN30: return NEEDS_TRANS ("Ambisonic 30"); + case ambisonicACN31: return NEEDS_TRANS ("Ambisonic 31"); + case ambisonicACN32: return NEEDS_TRANS ("Ambisonic 32"); + case ambisonicACN33: return NEEDS_TRANS ("Ambisonic 33"); + case ambisonicACN34: return NEEDS_TRANS ("Ambisonic 34"); + case ambisonicACN35: return NEEDS_TRANS ("Ambisonic 35"); + case ambisonicACN36: return NEEDS_TRANS ("Ambisonic 36"); + case ambisonicACN37: return NEEDS_TRANS ("Ambisonic 37"); + case ambisonicACN38: return NEEDS_TRANS ("Ambisonic 38"); + case ambisonicACN39: return NEEDS_TRANS ("Ambisonic 39"); + case ambisonicACN40: return NEEDS_TRANS ("Ambisonic 40"); + case ambisonicACN41: return NEEDS_TRANS ("Ambisonic 41"); + case ambisonicACN42: return NEEDS_TRANS ("Ambisonic 42"); + case ambisonicACN43: return NEEDS_TRANS ("Ambisonic 43"); + case ambisonicACN44: return NEEDS_TRANS ("Ambisonic 44"); + case ambisonicACN45: return NEEDS_TRANS ("Ambisonic 45"); + case ambisonicACN46: return NEEDS_TRANS ("Ambisonic 46"); + case ambisonicACN47: return NEEDS_TRANS ("Ambisonic 47"); + case ambisonicACN48: return NEEDS_TRANS ("Ambisonic 48"); + case ambisonicACN49: return NEEDS_TRANS ("Ambisonic 49"); + case ambisonicACN50: return NEEDS_TRANS ("Ambisonic 50"); + case ambisonicACN51: return NEEDS_TRANS ("Ambisonic 51"); + case ambisonicACN52: return NEEDS_TRANS ("Ambisonic 52"); + case ambisonicACN53: return NEEDS_TRANS ("Ambisonic 53"); + case ambisonicACN54: return NEEDS_TRANS ("Ambisonic 54"); + case ambisonicACN55: return NEEDS_TRANS ("Ambisonic 55"); + case ambisonicACN56: return NEEDS_TRANS ("Ambisonic 56"); + case ambisonicACN57: return NEEDS_TRANS ("Ambisonic 57"); + case ambisonicACN58: return NEEDS_TRANS ("Ambisonic 58"); + case ambisonicACN59: return NEEDS_TRANS ("Ambisonic 59"); + case ambisonicACN60: return NEEDS_TRANS ("Ambisonic 60"); + case ambisonicACN61: return NEEDS_TRANS ("Ambisonic 61"); + case ambisonicACN62: return NEEDS_TRANS ("Ambisonic 62"); + case ambisonicACN63: return NEEDS_TRANS ("Ambisonic 63"); + case bottomFrontLeft: return NEEDS_TRANS ("Bottom Front Left"); + case bottomFrontCentre: return NEEDS_TRANS ("Bottom Front Centre"); + case bottomFrontRight: return NEEDS_TRANS ("Bottom Front Right"); + case proximityLeft: return NEEDS_TRANS ("Proximity Left"); + case proximityRight: return NEEDS_TRANS ("Proximity Right"); + case bottomSideLeft: return NEEDS_TRANS ("Bottom Side Left"); + case bottomSideRight: return NEEDS_TRANS ("Bottom Side Right"); + case bottomRearLeft: return NEEDS_TRANS ("Bottom Rear Left"); + case bottomRearCentre: return NEEDS_TRANS ("Bottom Rear Centre"); + case bottomRearRight: return NEEDS_TRANS ("Bottom Rear Right"); case discreteChannel0: case unknown: default: break; @@ -487,7 +487,7 @@ int AudioChannelSet::size() const noexcept AudioChannelSet::ChannelType AudioChannelSet::getTypeOfChannel (int index) const noexcept { - int bit = channels.findNextSetBit(0); + int bit = channels.findNextSetBit (0); for (int i = 0; i < index && bit >= 0; ++i) bit = channels.findNextSetBit (bit + 1); @@ -514,7 +514,7 @@ Array AudioChannelSet::getChannelTypes() const { Array result; - for (int bit = channels.findNextSetBit(0); bit >= 0; bit = channels.findNextSetBit (bit + 1)) + for (int bit = channels.findNextSetBit (0); bit >= 0; bit = channels.findNextSetBit (bit + 1)) result.add (static_cast (bit)); return result; diff --git a/modules/juce_audio_basics/midi/juce_MidiFile.cpp b/modules/juce_audio_basics/midi/juce_MidiFile.cpp index 51bfcdda3a..19eb5a7896 100644 --- a/modules/juce_audio_basics/midi/juce_MidiFile.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiFile.cpp @@ -200,7 +200,7 @@ namespace MidiFileHelpers for (int j = 0; j < numEvents; ++j) { - auto& m = track->getEventPointer(j)->message; + auto& m = track->getEventPointer (j)->message; if ((m.*method)()) results.addEvent (m); @@ -439,7 +439,7 @@ void MidiFile::convertTimestampTicksToSeconds() { for (int j = ms->getNumEvents(); --j >= 0;) { - auto& m = ms->getEventPointer(j)->message; + auto& m = ms->getEventPointer (j)->message; m.setTimeStamp (MidiFileHelpers::convertTicksToSeconds (m.getTimeStamp(), tempoEvents, timeFormat)); } } @@ -475,7 +475,7 @@ bool MidiFile::writeTrack (OutputStream& mainOut, const MidiMessageSequence& ms) for (int i = 0; i < ms.getNumEvents(); ++i) { - auto& mm = ms.getEventPointer(i)->message; + auto& mm = ms.getEventPointer (i)->message; if (mm.isEndOfTrackMetaEvent()) endOfTrackEventWritten = true; diff --git a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp index 062262b096..4cb9f67e64 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp @@ -404,7 +404,7 @@ void MidiMessage::setChannel (const int channel) noexcept if ((data[0] & 0xf0) != (uint8) 0xf0) data[0] = (uint8) ((data[0] & (uint8) 0xf0) - | (uint8)(channel - 1)); + | (uint8) (channel - 1)); } bool MidiMessage::isNoteOn (const bool returnTrueForVelocity0) const noexcept @@ -1048,38 +1048,38 @@ const char* MidiMessage::getGMInstrumentName (const int n) { static const char* names[] = { - NEEDS_TRANS("Acoustic Grand Piano"), NEEDS_TRANS("Bright Acoustic Piano"), NEEDS_TRANS("Electric Grand Piano"), NEEDS_TRANS("Honky-tonk Piano"), - NEEDS_TRANS("Electric Piano 1"), NEEDS_TRANS("Electric Piano 2"), NEEDS_TRANS("Harpsichord"), NEEDS_TRANS("Clavinet"), - NEEDS_TRANS("Celesta"), NEEDS_TRANS("Glockenspiel"), NEEDS_TRANS("Music Box"), NEEDS_TRANS("Vibraphone"), - NEEDS_TRANS("Marimba"), NEEDS_TRANS("Xylophone"), NEEDS_TRANS("Tubular Bells"), NEEDS_TRANS("Dulcimer"), - NEEDS_TRANS("Drawbar Organ"), NEEDS_TRANS("Percussive Organ"), NEEDS_TRANS("Rock Organ"), NEEDS_TRANS("Church Organ"), - NEEDS_TRANS("Reed Organ"), NEEDS_TRANS("Accordion"), NEEDS_TRANS("Harmonica"), NEEDS_TRANS("Tango Accordion"), - NEEDS_TRANS("Acoustic Guitar (nylon)"), NEEDS_TRANS("Acoustic Guitar (steel)"), NEEDS_TRANS("Electric Guitar (jazz)"), NEEDS_TRANS("Electric Guitar (clean)"), - NEEDS_TRANS("Electric Guitar (mute)"), NEEDS_TRANS("Overdriven Guitar"), NEEDS_TRANS("Distortion Guitar"), NEEDS_TRANS("Guitar Harmonics"), - NEEDS_TRANS("Acoustic Bass"), NEEDS_TRANS("Electric Bass (finger)"), NEEDS_TRANS("Electric Bass (pick)"), NEEDS_TRANS("Fretless Bass"), - NEEDS_TRANS("Slap Bass 1"), NEEDS_TRANS("Slap Bass 2"), NEEDS_TRANS("Synth Bass 1"), NEEDS_TRANS("Synth Bass 2"), - NEEDS_TRANS("Violin"), NEEDS_TRANS("Viola"), NEEDS_TRANS("Cello"), NEEDS_TRANS("Contrabass"), - NEEDS_TRANS("Tremolo Strings"), NEEDS_TRANS("Pizzicato Strings"), NEEDS_TRANS("Orchestral Harp"), NEEDS_TRANS("Timpani"), - NEEDS_TRANS("String Ensemble 1"), NEEDS_TRANS("String Ensemble 2"), NEEDS_TRANS("SynthStrings 1"), NEEDS_TRANS("SynthStrings 2"), - NEEDS_TRANS("Choir Aahs"), NEEDS_TRANS("Voice Oohs"), NEEDS_TRANS("Synth Voice"), NEEDS_TRANS("Orchestra Hit"), - NEEDS_TRANS("Trumpet"), NEEDS_TRANS("Trombone"), NEEDS_TRANS("Tuba"), NEEDS_TRANS("Muted Trumpet"), - NEEDS_TRANS("French Horn"), NEEDS_TRANS("Brass Section"), NEEDS_TRANS("SynthBrass 1"), NEEDS_TRANS("SynthBrass 2"), - NEEDS_TRANS("Soprano Sax"), NEEDS_TRANS("Alto Sax"), NEEDS_TRANS("Tenor Sax"), NEEDS_TRANS("Baritone Sax"), - NEEDS_TRANS("Oboe"), NEEDS_TRANS("English Horn"), NEEDS_TRANS("Bassoon"), NEEDS_TRANS("Clarinet"), - NEEDS_TRANS("Piccolo"), NEEDS_TRANS("Flute"), NEEDS_TRANS("Recorder"), NEEDS_TRANS("Pan Flute"), - NEEDS_TRANS("Blown Bottle"), NEEDS_TRANS("Shakuhachi"), NEEDS_TRANS("Whistle"), NEEDS_TRANS("Ocarina"), - NEEDS_TRANS("Lead 1 (square)"), NEEDS_TRANS("Lead 2 (sawtooth)"), NEEDS_TRANS("Lead 3 (calliope)"), NEEDS_TRANS("Lead 4 (chiff)"), - NEEDS_TRANS("Lead 5 (charang)"), NEEDS_TRANS("Lead 6 (voice)"), NEEDS_TRANS("Lead 7 (fifths)"), NEEDS_TRANS("Lead 8 (bass+lead)"), - NEEDS_TRANS("Pad 1 (new age)"), NEEDS_TRANS("Pad 2 (warm)"), NEEDS_TRANS("Pad 3 (polysynth)"), NEEDS_TRANS("Pad 4 (choir)"), - NEEDS_TRANS("Pad 5 (bowed)"), NEEDS_TRANS("Pad 6 (metallic)"), NEEDS_TRANS("Pad 7 (halo)"), NEEDS_TRANS("Pad 8 (sweep)"), - NEEDS_TRANS("FX 1 (rain)"), NEEDS_TRANS("FX 2 (soundtrack)"), NEEDS_TRANS("FX 3 (crystal)"), NEEDS_TRANS("FX 4 (atmosphere)"), - NEEDS_TRANS("FX 5 (brightness)"), NEEDS_TRANS("FX 6 (goblins)"), NEEDS_TRANS("FX 7 (echoes)"), NEEDS_TRANS("FX 8 (sci-fi)"), - NEEDS_TRANS("Sitar"), NEEDS_TRANS("Banjo"), NEEDS_TRANS("Shamisen"), NEEDS_TRANS("Koto"), - NEEDS_TRANS("Kalimba"), NEEDS_TRANS("Bag pipe"), NEEDS_TRANS("Fiddle"), NEEDS_TRANS("Shanai"), - NEEDS_TRANS("Tinkle Bell"), NEEDS_TRANS("Agogo"), NEEDS_TRANS("Steel Drums"), NEEDS_TRANS("Woodblock"), - NEEDS_TRANS("Taiko Drum"), NEEDS_TRANS("Melodic Tom"), NEEDS_TRANS("Synth Drum"), NEEDS_TRANS("Reverse Cymbal"), - NEEDS_TRANS("Guitar Fret Noise"), NEEDS_TRANS("Breath Noise"), NEEDS_TRANS("Seashore"), NEEDS_TRANS("Bird Tweet"), - NEEDS_TRANS("Telephone Ring"), NEEDS_TRANS("Helicopter"), NEEDS_TRANS("Applause"), NEEDS_TRANS("Gunshot") + NEEDS_TRANS ("Acoustic Grand Piano"), NEEDS_TRANS ("Bright Acoustic Piano"), NEEDS_TRANS ("Electric Grand Piano"), NEEDS_TRANS ("Honky-tonk Piano"), + NEEDS_TRANS ("Electric Piano 1"), NEEDS_TRANS ("Electric Piano 2"), NEEDS_TRANS ("Harpsichord"), NEEDS_TRANS ("Clavinet"), + NEEDS_TRANS ("Celesta"), NEEDS_TRANS ("Glockenspiel"), NEEDS_TRANS ("Music Box"), NEEDS_TRANS ("Vibraphone"), + NEEDS_TRANS ("Marimba"), NEEDS_TRANS ("Xylophone"), NEEDS_TRANS ("Tubular Bells"), NEEDS_TRANS ("Dulcimer"), + NEEDS_TRANS ("Drawbar Organ"), NEEDS_TRANS ("Percussive Organ"), NEEDS_TRANS ("Rock Organ"), NEEDS_TRANS ("Church Organ"), + NEEDS_TRANS ("Reed Organ"), NEEDS_TRANS ("Accordion"), NEEDS_TRANS ("Harmonica"), NEEDS_TRANS ("Tango Accordion"), + NEEDS_TRANS ("Acoustic Guitar (nylon)"), NEEDS_TRANS ("Acoustic Guitar (steel)"), NEEDS_TRANS ("Electric Guitar (jazz)"), NEEDS_TRANS ("Electric Guitar (clean)"), + NEEDS_TRANS ("Electric Guitar (mute)"), NEEDS_TRANS ("Overdriven Guitar"), NEEDS_TRANS ("Distortion Guitar"), NEEDS_TRANS ("Guitar Harmonics"), + NEEDS_TRANS ("Acoustic Bass"), NEEDS_TRANS ("Electric Bass (finger)"), NEEDS_TRANS ("Electric Bass (pick)"), NEEDS_TRANS ("Fretless Bass"), + NEEDS_TRANS ("Slap Bass 1"), NEEDS_TRANS ("Slap Bass 2"), NEEDS_TRANS ("Synth Bass 1"), NEEDS_TRANS ("Synth Bass 2"), + NEEDS_TRANS ("Violin"), NEEDS_TRANS ("Viola"), NEEDS_TRANS ("Cello"), NEEDS_TRANS ("Contrabass"), + NEEDS_TRANS ("Tremolo Strings"), NEEDS_TRANS ("Pizzicato Strings"), NEEDS_TRANS ("Orchestral Harp"), NEEDS_TRANS ("Timpani"), + NEEDS_TRANS ("String Ensemble 1"), NEEDS_TRANS ("String Ensemble 2"), NEEDS_TRANS ("SynthStrings 1"), NEEDS_TRANS ("SynthStrings 2"), + NEEDS_TRANS ("Choir Aahs"), NEEDS_TRANS ("Voice Oohs"), NEEDS_TRANS ("Synth Voice"), NEEDS_TRANS ("Orchestra Hit"), + NEEDS_TRANS ("Trumpet"), NEEDS_TRANS ("Trombone"), NEEDS_TRANS ("Tuba"), NEEDS_TRANS ("Muted Trumpet"), + NEEDS_TRANS ("French Horn"), NEEDS_TRANS ("Brass Section"), NEEDS_TRANS ("SynthBrass 1"), NEEDS_TRANS ("SynthBrass 2"), + NEEDS_TRANS ("Soprano Sax"), NEEDS_TRANS ("Alto Sax"), NEEDS_TRANS ("Tenor Sax"), NEEDS_TRANS ("Baritone Sax"), + NEEDS_TRANS ("Oboe"), NEEDS_TRANS ("English Horn"), NEEDS_TRANS ("Bassoon"), NEEDS_TRANS ("Clarinet"), + NEEDS_TRANS ("Piccolo"), NEEDS_TRANS ("Flute"), NEEDS_TRANS ("Recorder"), NEEDS_TRANS ("Pan Flute"), + NEEDS_TRANS ("Blown Bottle"), NEEDS_TRANS ("Shakuhachi"), NEEDS_TRANS ("Whistle"), NEEDS_TRANS ("Ocarina"), + NEEDS_TRANS ("Lead 1 (square)"), NEEDS_TRANS ("Lead 2 (sawtooth)"), NEEDS_TRANS ("Lead 3 (calliope)"), NEEDS_TRANS ("Lead 4 (chiff)"), + NEEDS_TRANS ("Lead 5 (charang)"), NEEDS_TRANS ("Lead 6 (voice)"), NEEDS_TRANS ("Lead 7 (fifths)"), NEEDS_TRANS ("Lead 8 (bass+lead)"), + NEEDS_TRANS ("Pad 1 (new age)"), NEEDS_TRANS ("Pad 2 (warm)"), NEEDS_TRANS ("Pad 3 (polysynth)"), NEEDS_TRANS ("Pad 4 (choir)"), + NEEDS_TRANS ("Pad 5 (bowed)"), NEEDS_TRANS ("Pad 6 (metallic)"), NEEDS_TRANS ("Pad 7 (halo)"), NEEDS_TRANS ("Pad 8 (sweep)"), + NEEDS_TRANS ("FX 1 (rain)"), NEEDS_TRANS ("FX 2 (soundtrack)"), NEEDS_TRANS ("FX 3 (crystal)"), NEEDS_TRANS ("FX 4 (atmosphere)"), + NEEDS_TRANS ("FX 5 (brightness)"), NEEDS_TRANS ("FX 6 (goblins)"), NEEDS_TRANS ("FX 7 (echoes)"), NEEDS_TRANS ("FX 8 (sci-fi)"), + NEEDS_TRANS ("Sitar"), NEEDS_TRANS ("Banjo"), NEEDS_TRANS ("Shamisen"), NEEDS_TRANS ("Koto"), + NEEDS_TRANS ("Kalimba"), NEEDS_TRANS ("Bag pipe"), NEEDS_TRANS ("Fiddle"), NEEDS_TRANS ("Shanai"), + NEEDS_TRANS ("Tinkle Bell"), NEEDS_TRANS ("Agogo"), NEEDS_TRANS ("Steel Drums"), NEEDS_TRANS ("Woodblock"), + NEEDS_TRANS ("Taiko Drum"), NEEDS_TRANS ("Melodic Tom"), NEEDS_TRANS ("Synth Drum"), NEEDS_TRANS ("Reverse Cymbal"), + NEEDS_TRANS ("Guitar Fret Noise"), NEEDS_TRANS ("Breath Noise"), NEEDS_TRANS ("Seashore"), NEEDS_TRANS ("Bird Tweet"), + NEEDS_TRANS ("Telephone Ring"), NEEDS_TRANS ("Helicopter"), NEEDS_TRANS ("Applause"), NEEDS_TRANS ("Gunshot") }; return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr; @@ -1089,10 +1089,10 @@ const char* MidiMessage::getGMInstrumentBankName (const int n) { static const char* names[] = { - NEEDS_TRANS("Piano"), NEEDS_TRANS("Chromatic Percussion"), NEEDS_TRANS("Organ"), NEEDS_TRANS("Guitar"), - NEEDS_TRANS("Bass"), NEEDS_TRANS("Strings"), NEEDS_TRANS("Ensemble"), NEEDS_TRANS("Brass"), - NEEDS_TRANS("Reed"), NEEDS_TRANS("Pipe"), NEEDS_TRANS("Synth Lead"), NEEDS_TRANS("Synth Pad"), - NEEDS_TRANS("Synth Effects"), NEEDS_TRANS("Ethnic"), NEEDS_TRANS("Percussive"), NEEDS_TRANS("Sound Effects") + NEEDS_TRANS ("Piano"), NEEDS_TRANS ("Chromatic Percussion"), NEEDS_TRANS ("Organ"), NEEDS_TRANS ("Guitar"), + NEEDS_TRANS ("Bass"), NEEDS_TRANS ("Strings"), NEEDS_TRANS ("Ensemble"), NEEDS_TRANS ("Brass"), + NEEDS_TRANS ("Reed"), NEEDS_TRANS ("Pipe"), NEEDS_TRANS ("Synth Lead"), NEEDS_TRANS ("Synth Pad"), + NEEDS_TRANS ("Synth Effects"), NEEDS_TRANS ("Ethnic"), NEEDS_TRANS ("Percussive"), NEEDS_TRANS ("Sound Effects") }; return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr; @@ -1102,18 +1102,18 @@ const char* MidiMessage::getRhythmInstrumentName (const int n) { static const char* names[] = { - NEEDS_TRANS("Acoustic Bass Drum"), NEEDS_TRANS("Bass Drum 1"), NEEDS_TRANS("Side Stick"), NEEDS_TRANS("Acoustic Snare"), - NEEDS_TRANS("Hand Clap"), NEEDS_TRANS("Electric Snare"), NEEDS_TRANS("Low Floor Tom"), NEEDS_TRANS("Closed Hi-Hat"), - NEEDS_TRANS("High Floor Tom"), NEEDS_TRANS("Pedal Hi-Hat"), NEEDS_TRANS("Low Tom"), NEEDS_TRANS("Open Hi-Hat"), - NEEDS_TRANS("Low-Mid Tom"), NEEDS_TRANS("Hi-Mid Tom"), NEEDS_TRANS("Crash Cymbal 1"), NEEDS_TRANS("High Tom"), - NEEDS_TRANS("Ride Cymbal 1"), NEEDS_TRANS("Chinese Cymbal"), NEEDS_TRANS("Ride Bell"), NEEDS_TRANS("Tambourine"), - NEEDS_TRANS("Splash Cymbal"), NEEDS_TRANS("Cowbell"), NEEDS_TRANS("Crash Cymbal 2"), NEEDS_TRANS("Vibraslap"), - NEEDS_TRANS("Ride Cymbal 2"), NEEDS_TRANS("Hi Bongo"), NEEDS_TRANS("Low Bongo"), NEEDS_TRANS("Mute Hi Conga"), - NEEDS_TRANS("Open Hi Conga"), NEEDS_TRANS("Low Conga"), NEEDS_TRANS("High Timbale"), NEEDS_TRANS("Low Timbale"), - NEEDS_TRANS("High Agogo"), NEEDS_TRANS("Low Agogo"), NEEDS_TRANS("Cabasa"), NEEDS_TRANS("Maracas"), - NEEDS_TRANS("Short Whistle"), NEEDS_TRANS("Long Whistle"), NEEDS_TRANS("Short Guiro"), NEEDS_TRANS("Long Guiro"), - NEEDS_TRANS("Claves"), NEEDS_TRANS("Hi Wood Block"), NEEDS_TRANS("Low Wood Block"), NEEDS_TRANS("Mute Cuica"), - NEEDS_TRANS("Open Cuica"), NEEDS_TRANS("Mute Triangle"), NEEDS_TRANS("Open Triangle") + NEEDS_TRANS ("Acoustic Bass Drum"), NEEDS_TRANS ("Bass Drum 1"), NEEDS_TRANS ("Side Stick"), NEEDS_TRANS ("Acoustic Snare"), + NEEDS_TRANS ("Hand Clap"), NEEDS_TRANS ("Electric Snare"), NEEDS_TRANS ("Low Floor Tom"), NEEDS_TRANS ("Closed Hi-Hat"), + NEEDS_TRANS ("High Floor Tom"), NEEDS_TRANS ("Pedal Hi-Hat"), NEEDS_TRANS ("Low Tom"), NEEDS_TRANS ("Open Hi-Hat"), + NEEDS_TRANS ("Low-Mid Tom"), NEEDS_TRANS ("Hi-Mid Tom"), NEEDS_TRANS ("Crash Cymbal 1"), NEEDS_TRANS ("High Tom"), + NEEDS_TRANS ("Ride Cymbal 1"), NEEDS_TRANS ("Chinese Cymbal"), NEEDS_TRANS ("Ride Bell"), NEEDS_TRANS ("Tambourine"), + NEEDS_TRANS ("Splash Cymbal"), NEEDS_TRANS ("Cowbell"), NEEDS_TRANS ("Crash Cymbal 2"), NEEDS_TRANS ("Vibraslap"), + NEEDS_TRANS ("Ride Cymbal 2"), NEEDS_TRANS ("Hi Bongo"), NEEDS_TRANS ("Low Bongo"), NEEDS_TRANS ("Mute Hi Conga"), + NEEDS_TRANS ("Open Hi Conga"), NEEDS_TRANS ("Low Conga"), NEEDS_TRANS ("High Timbale"), NEEDS_TRANS ("Low Timbale"), + NEEDS_TRANS ("High Agogo"), NEEDS_TRANS ("Low Agogo"), NEEDS_TRANS ("Cabasa"), NEEDS_TRANS ("Maracas"), + NEEDS_TRANS ("Short Whistle"), NEEDS_TRANS ("Long Whistle"), NEEDS_TRANS ("Short Guiro"), NEEDS_TRANS ("Long Guiro"), + NEEDS_TRANS ("Claves"), NEEDS_TRANS ("Hi Wood Block"), NEEDS_TRANS ("Low Wood Block"), NEEDS_TRANS ("Mute Cuica"), + NEEDS_TRANS ("Open Cuica"), NEEDS_TRANS ("Mute Triangle"), NEEDS_TRANS ("Open Triangle") }; return (n >= 35 && n <= 81) ? names[n - 35] : nullptr; @@ -1123,38 +1123,38 @@ const char* MidiMessage::getControllerName (const int n) { static const char* names[] = { - NEEDS_TRANS("Bank Select"), NEEDS_TRANS("Modulation Wheel (coarse)"), NEEDS_TRANS("Breath controller (coarse)"), + NEEDS_TRANS ("Bank Select"), NEEDS_TRANS ("Modulation Wheel (coarse)"), NEEDS_TRANS ("Breath controller (coarse)"), nullptr, - NEEDS_TRANS("Foot Pedal (coarse)"), NEEDS_TRANS("Portamento Time (coarse)"), NEEDS_TRANS("Data Entry (coarse)"), - NEEDS_TRANS("Volume (coarse)"), NEEDS_TRANS("Balance (coarse)"), + NEEDS_TRANS ("Foot Pedal (coarse)"), NEEDS_TRANS ("Portamento Time (coarse)"), NEEDS_TRANS ("Data Entry (coarse)"), + NEEDS_TRANS ("Volume (coarse)"), NEEDS_TRANS ("Balance (coarse)"), nullptr, - NEEDS_TRANS("Pan position (coarse)"), NEEDS_TRANS("Expression (coarse)"), NEEDS_TRANS("Effect Control 1 (coarse)"), - NEEDS_TRANS("Effect Control 2 (coarse)"), + NEEDS_TRANS ("Pan position (coarse)"), NEEDS_TRANS ("Expression (coarse)"), NEEDS_TRANS ("Effect Control 1 (coarse)"), + NEEDS_TRANS ("Effect Control 2 (coarse)"), nullptr, nullptr, - NEEDS_TRANS("General Purpose Slider 1"), NEEDS_TRANS("General Purpose Slider 2"), - NEEDS_TRANS("General Purpose Slider 3"), NEEDS_TRANS("General Purpose Slider 4"), + NEEDS_TRANS ("General Purpose Slider 1"), NEEDS_TRANS ("General Purpose Slider 2"), + NEEDS_TRANS ("General Purpose Slider 3"), NEEDS_TRANS ("General Purpose Slider 4"), nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, - NEEDS_TRANS("Bank Select (fine)"), NEEDS_TRANS("Modulation Wheel (fine)"), NEEDS_TRANS("Breath controller (fine)"), + NEEDS_TRANS ("Bank Select (fine)"), NEEDS_TRANS ("Modulation Wheel (fine)"), NEEDS_TRANS ("Breath controller (fine)"), nullptr, - NEEDS_TRANS("Foot Pedal (fine)"), NEEDS_TRANS("Portamento Time (fine)"), NEEDS_TRANS("Data Entry (fine)"), NEEDS_TRANS("Volume (fine)"), - NEEDS_TRANS("Balance (fine)"), nullptr, NEEDS_TRANS("Pan position (fine)"), NEEDS_TRANS("Expression (fine)"), - NEEDS_TRANS("Effect Control 1 (fine)"), NEEDS_TRANS("Effect Control 2 (fine)"), + NEEDS_TRANS ("Foot Pedal (fine)"), NEEDS_TRANS ("Portamento Time (fine)"), NEEDS_TRANS ("Data Entry (fine)"), NEEDS_TRANS ("Volume (fine)"), + NEEDS_TRANS ("Balance (fine)"), nullptr, NEEDS_TRANS ("Pan position (fine)"), NEEDS_TRANS ("Expression (fine)"), + NEEDS_TRANS ("Effect Control 1 (fine)"), NEEDS_TRANS ("Effect Control 2 (fine)"), nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, - NEEDS_TRANS("Hold Pedal (on/off)"), NEEDS_TRANS("Portamento (on/off)"), NEEDS_TRANS("Sustenuto Pedal (on/off)"), NEEDS_TRANS("Soft Pedal (on/off)"), - NEEDS_TRANS("Legato Pedal (on/off)"), NEEDS_TRANS("Hold 2 Pedal (on/off)"), NEEDS_TRANS("Sound Variation"), NEEDS_TRANS("Sound Timbre"), - NEEDS_TRANS("Sound Release Time"), NEEDS_TRANS("Sound Attack Time"), NEEDS_TRANS("Sound Brightness"), NEEDS_TRANS("Sound Control 6"), - NEEDS_TRANS("Sound Control 7"), NEEDS_TRANS("Sound Control 8"), NEEDS_TRANS("Sound Control 9"), NEEDS_TRANS("Sound Control 10"), - NEEDS_TRANS("General Purpose Button 1 (on/off)"), NEEDS_TRANS("General Purpose Button 2 (on/off)"), - NEEDS_TRANS("General Purpose Button 3 (on/off)"), NEEDS_TRANS("General Purpose Button 4 (on/off)"), + NEEDS_TRANS ("Hold Pedal (on/off)"), NEEDS_TRANS ("Portamento (on/off)"), NEEDS_TRANS ("Sustenuto Pedal (on/off)"), NEEDS_TRANS ("Soft Pedal (on/off)"), + NEEDS_TRANS ("Legato Pedal (on/off)"), NEEDS_TRANS ("Hold 2 Pedal (on/off)"), NEEDS_TRANS ("Sound Variation"), NEEDS_TRANS ("Sound Timbre"), + NEEDS_TRANS ("Sound Release Time"), NEEDS_TRANS ("Sound Attack Time"), NEEDS_TRANS ("Sound Brightness"), NEEDS_TRANS ("Sound Control 6"), + NEEDS_TRANS ("Sound Control 7"), NEEDS_TRANS ("Sound Control 8"), NEEDS_TRANS ("Sound Control 9"), NEEDS_TRANS ("Sound Control 10"), + NEEDS_TRANS ("General Purpose Button 1 (on/off)"), NEEDS_TRANS ("General Purpose Button 2 (on/off)"), + NEEDS_TRANS ("General Purpose Button 3 (on/off)"), NEEDS_TRANS ("General Purpose Button 4 (on/off)"), nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, - NEEDS_TRANS("Reverb Level"), NEEDS_TRANS("Tremolo Level"), NEEDS_TRANS("Chorus Level"), NEEDS_TRANS("Celeste Level"), - NEEDS_TRANS("Phaser Level"), NEEDS_TRANS("Data Button increment"), NEEDS_TRANS("Data Button decrement"), NEEDS_TRANS("Non-registered Parameter (fine)"), - NEEDS_TRANS("Non-registered Parameter (coarse)"), NEEDS_TRANS("Registered Parameter (fine)"), NEEDS_TRANS("Registered Parameter (coarse)"), + NEEDS_TRANS ("Reverb Level"), NEEDS_TRANS ("Tremolo Level"), NEEDS_TRANS ("Chorus Level"), NEEDS_TRANS ("Celeste Level"), + NEEDS_TRANS ("Phaser Level"), NEEDS_TRANS ("Data Button increment"), NEEDS_TRANS ("Data Button decrement"), NEEDS_TRANS ("Non-registered Parameter (fine)"), + NEEDS_TRANS ("Non-registered Parameter (coarse)"), NEEDS_TRANS ("Registered Parameter (fine)"), NEEDS_TRANS ("Registered Parameter (coarse)"), nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, - NEEDS_TRANS("All Sound Off"), NEEDS_TRANS("All Controllers Off"), NEEDS_TRANS("Local Keyboard (on/off)"), NEEDS_TRANS("All Notes Off"), - NEEDS_TRANS("Omni Mode Off"), NEEDS_TRANS("Omni Mode On"), NEEDS_TRANS("Mono Operation"), NEEDS_TRANS("Poly Operation") + NEEDS_TRANS ("All Sound Off"), NEEDS_TRANS ("All Controllers Off"), NEEDS_TRANS ("Local Keyboard (on/off)"), NEEDS_TRANS ("All Notes Off"), + NEEDS_TRANS ("Omni Mode Off"), NEEDS_TRANS ("Omni Mode On"), NEEDS_TRANS ("Mono Operation"), NEEDS_TRANS ("Poly Operation") }; return isPositiveAndBelow (n, numElementsInArray (names)) ? names[n] : nullptr; diff --git a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp index 95d0122201..a3f6d61cf2 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessageSequence.cpp @@ -40,7 +40,7 @@ MidiMessageSequence::MidiMessageSequence (const MidiMessageSequence& other) auto noteOffIndex = other.getIndexOfMatchingKeyUp (i); if (noteOffIndex >= 0) - list.getUnchecked(i)->noteOffObject = list.getUnchecked (noteOffIndex); + list.getUnchecked (i)->noteOffObject = list.getUnchecked (noteOffIndex); } } @@ -103,7 +103,7 @@ int MidiMessageSequence::getIndexOfMatchingKeyUp (int index) const noexcept if (auto* noteOff = meh->noteOffObject) { for (int i = index; i < list.size(); ++i) - if (list.getUnchecked(i) == noteOff) + if (list.getUnchecked (i) == noteOff) return i; jassertfalse; // we've somehow got a pointer to a note-off object that isn't in the sequence @@ -124,7 +124,7 @@ int MidiMessageSequence::getNextIndexAtTime (double timeStamp) const noexcept int i; for (i = 0; i < numEvents; ++i) - if (list.getUnchecked(i)->message.getTimeStamp() >= timeStamp) + if (list.getUnchecked (i)->message.getTimeStamp() >= timeStamp) break; return i; @@ -157,7 +157,7 @@ MidiMessageSequence::MidiEventHolder* MidiMessageSequence::addEvent (MidiEventHo int i; for (i = list.size(); --i >= 0;) - if (list.getUnchecked(i)->message.getTimeStamp() <= time) + if (list.getUnchecked (i)->message.getTimeStamp() <= time) break; list.insert (i + 1, newEvent); @@ -227,7 +227,7 @@ void MidiMessageSequence::updateMatchedPairs() noexcept { for (int i = 0; i < list.size(); ++i) { - auto* meh = list.getUnchecked(i); + auto* meh = list.getUnchecked (i); auto& m1 = meh->message; if (m1.isNoteOn()) @@ -239,7 +239,7 @@ void MidiMessageSequence::updateMatchedPairs() noexcept for (int j = i + 1; j < len; ++j) { - auto* meh2 = list.getUnchecked(j); + auto* meh2 = list.getUnchecked (j); auto& m = meh2->message; if (m.getNoteNumber() == note && m.getChannel() == chan) @@ -292,15 +292,15 @@ void MidiMessageSequence::extractSysExMessages (MidiMessageSequence& destSequenc void MidiMessageSequence::deleteMidiChannelMessages (const int channelNumberToRemove) { for (int i = list.size(); --i >= 0;) - if (list.getUnchecked(i)->message.isForChannel (channelNumberToRemove)) - list.remove(i); + if (list.getUnchecked (i)->message.isForChannel (channelNumberToRemove)) + list.remove (i); } void MidiMessageSequence::deleteSysExMessages() { for (int i = list.size(); --i >= 0;) - if (list.getUnchecked(i)->message.isSysEx()) - list.remove(i); + if (list.getUnchecked (i)->message.isSysEx()) + list.remove (i); } //============================================================================== diff --git a/modules/juce_audio_basics/midi/ump/juce_UMPView.h b/modules/juce_audio_basics/midi/ump/juce_UMPView.h index e9f70d6def..02bce2975d 100644 --- a/modules/juce_audio_basics/midi/ump/juce_UMPView.h +++ b/modules/juce_audio_basics/midi/ump/juce_UMPView.h @@ -33,7 +33,7 @@ namespace universal_midi_packets The packet must be well-formed for member functions to work correctly. Specifically, the constructor argument must be the beginning of a region of - uint32_t that contains at least `getNumWordsForMessageType(*data)` items, + uint32_t that contains at least `getNumWordsForMessageType (*data)` items, where `data` is the constructor argument. NOTE: Instances of this class do not own the memory that they point to! diff --git a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp index c7f485431f..aef4b0ff13 100644 --- a/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_ChannelRemappingAudioSource.cpp @@ -153,10 +153,10 @@ std::unique_ptr ChannelRemappingAudioSource::createXml() const const ScopedLock sl (lock); for (int i = 0; i < remappedInputs.size(); ++i) - ins << remappedInputs.getUnchecked(i) << ' '; + ins << remappedInputs.getUnchecked (i) << ' '; for (int i = 0; i < remappedOutputs.size(); ++i) - outs << remappedOutputs.getUnchecked(i) << ' '; + outs << remappedOutputs.getUnchecked (i) << ' '; e->setAttribute ("inputs", ins.trimEnd()); e->setAttribute ("outputs", outs.trimEnd()); diff --git a/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp b/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp index a784c048a6..1a5982289b 100644 --- a/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_IIRFilterAudioSource.cpp @@ -39,13 +39,13 @@ IIRFilterAudioSource::~IIRFilterAudioSource() {} void IIRFilterAudioSource::setCoefficients (const IIRCoefficients& newCoefficients) { for (int i = iirFilters.size(); --i >= 0;) - iirFilters.getUnchecked(i)->setCoefficients (newCoefficients); + iirFilters.getUnchecked (i)->setCoefficients (newCoefficients); } void IIRFilterAudioSource::makeInactive() { for (int i = iirFilters.size(); --i >= 0;) - iirFilters.getUnchecked(i)->makeInactive(); + iirFilters.getUnchecked (i)->makeInactive(); } //============================================================================== @@ -54,7 +54,7 @@ void IIRFilterAudioSource::prepareToPlay (int samplesPerBlockExpected, double sa input->prepareToPlay (samplesPerBlockExpected, sampleRate); for (int i = iirFilters.size(); --i >= 0;) - iirFilters.getUnchecked(i)->reset(); + iirFilters.getUnchecked (i)->reset(); } void IIRFilterAudioSource::releaseResources() @@ -72,7 +72,7 @@ void IIRFilterAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& buff iirFilters.add (new IIRFilter (*iirFilters.getUnchecked (0))); for (int i = 0; i < numChannels; ++i) - iirFilters.getUnchecked(i) + iirFilters.getUnchecked (i) ->processSamples (bufferToFill.buffer->getWritePointer (i, bufferToFill.startSample), bufferToFill.numSamples); } diff --git a/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp b/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp index 79d60e62c4..666ed1059c 100644 --- a/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_MixerAudioSource.cpp @@ -90,13 +90,13 @@ void MixerAudioSource::removeAllInputs() for (int i = inputs.size(); --i >= 0;) if (inputsToDelete[i]) - toDelete.add (inputs.getUnchecked(i)); + toDelete.add (inputs.getUnchecked (i)); inputs.clear(); } for (int i = toDelete.size(); --i >= 0;) - toDelete.getUnchecked(i)->releaseResources(); + toDelete.getUnchecked (i)->releaseResources(); } void MixerAudioSource::prepareToPlay (int samplesPerBlockExpected, double sampleRate) @@ -109,7 +109,7 @@ void MixerAudioSource::prepareToPlay (int samplesPerBlockExpected, double sample bufferSizeExpected = samplesPerBlockExpected; for (int i = inputs.size(); --i >= 0;) - inputs.getUnchecked(i)->prepareToPlay (samplesPerBlockExpected, sampleRate); + inputs.getUnchecked (i)->prepareToPlay (samplesPerBlockExpected, sampleRate); } void MixerAudioSource::releaseResources() @@ -117,7 +117,7 @@ void MixerAudioSource::releaseResources() const ScopedLock sl (lock); for (int i = inputs.size(); --i >= 0;) - inputs.getUnchecked(i)->releaseResources(); + inputs.getUnchecked (i)->releaseResources(); tempBuffer.setSize (2, 0); @@ -131,7 +131,7 @@ void MixerAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info) if (inputs.size() > 0) { - inputs.getUnchecked(0)->getNextAudioBlock (info); + inputs.getUnchecked (0)->getNextAudioBlock (info); if (inputs.size() > 1) { @@ -142,7 +142,7 @@ void MixerAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& info) for (int i = 1; i < inputs.size(); ++i) { - inputs.getUnchecked(i)->getNextAudioBlock (info2); + inputs.getUnchecked (i)->getNextAudioBlock (info2); for (int chan = 0; chan < info.buffer->getNumChannels(); ++chan) info.buffer->addFrom (chan, info.startSample, tempBuffer, chan, 0, info.numSamples); diff --git a/modules/juce_audio_basics/utilities/juce_IIRFilter.cpp b/modules/juce_audio_basics/utilities/juce_IIRFilter.cpp index c1e32254db..3c129cb0da 100644 --- a/modules/juce_audio_basics/utilities/juce_IIRFilter.cpp +++ b/modules/juce_audio_basics/utilities/juce_IIRFilter.cpp @@ -84,7 +84,7 @@ IIRCoefficients IIRCoefficients::makeLowPass (double sampleRate, IIRCoefficients IIRCoefficients::makeHighPass (double sampleRate, double frequency) noexcept { - return makeHighPass (sampleRate, frequency, 1.0 / std::sqrt(2.0)); + return makeHighPass (sampleRate, frequency, 1.0 / std::sqrt (2.0)); } IIRCoefficients IIRCoefficients::makeHighPass (double sampleRate, diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index 98822741d6..cf6e5d5d70 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -659,7 +659,7 @@ void AudioDeviceManager::setCurrentAudioDeviceType (const String& type, bool tre { for (int i = 0; i < availableDeviceTypes.size(); ++i) { - if (availableDeviceTypes.getUnchecked(i)->getTypeName() == type + if (availableDeviceTypes.getUnchecked (i)->getTypeName() == type && currentDeviceType != type) { if (currentAudioDevice != nullptr) @@ -671,7 +671,7 @@ void AudioDeviceManager::setCurrentAudioDeviceType (const String& type, bool tre currentDeviceType = type; - AudioDeviceSetup s (*lastDeviceTypeConfigs.getUnchecked(i)); + AudioDeviceSetup s (*lastDeviceTypeConfigs.getUnchecked (i)); insertDefaultDeviceNames (s); setAudioDeviceSetup (s, treatAsChosenDevice); @@ -1007,23 +1007,23 @@ void AudioDeviceManager::audioDeviceIOCallbackInt (const float* const* inputChan tempBuffer.setSize (jmax (1, numOutputChannels), jmax (1, numSamples), false, false, true); - callbacks.getUnchecked(0)->audioDeviceIOCallbackWithContext (inputChannelData, - numInputChannels, - outputChannelData, - numOutputChannels, - numSamples, - context); + callbacks.getUnchecked (0)->audioDeviceIOCallbackWithContext (inputChannelData, + numInputChannels, + outputChannelData, + numOutputChannels, + numSamples, + context); auto* const* tempChans = tempBuffer.getArrayOfWritePointers(); for (int i = callbacks.size(); --i > 0;) { - callbacks.getUnchecked(i)->audioDeviceIOCallbackWithContext (inputChannelData, - numInputChannels, - tempChans, - numOutputChannels, - numSamples, - context); + callbacks.getUnchecked (i)->audioDeviceIOCallbackWithContext (inputChannelData, + numInputChannels, + tempChans, + numOutputChannels, + numSamples, + context); for (int chan = 0; chan < numOutputChannels; ++chan) { @@ -1070,7 +1070,7 @@ void AudioDeviceManager::audioDeviceAboutToStartInt (AudioIODevice* const device const ScopedLock sl (audioCallbackLock); for (int i = callbacks.size(); --i >= 0;) - callbacks.getUnchecked(i)->audioDeviceAboutToStart (device); + callbacks.getUnchecked (i)->audioDeviceAboutToStart (device); } sendChangeMessage(); @@ -1085,7 +1085,7 @@ void AudioDeviceManager::audioDeviceStoppedInt() loadMeasurer.reset(); for (int i = callbacks.size(); --i >= 0;) - callbacks.getUnchecked(i)->audioDeviceStopped(); + callbacks.getUnchecked (i)->audioDeviceStopped(); } void AudioDeviceManager::audioDeviceErrorInt (const String& message) @@ -1093,7 +1093,7 @@ void AudioDeviceManager::audioDeviceErrorInt (const String& message) const ScopedLock sl (audioCallbackLock); for (int i = callbacks.size(); --i >= 0;) - callbacks.getUnchecked(i)->audioDeviceError (message); + callbacks.getUnchecked (i)->audioDeviceError (message); } double AudioDeviceManager::getCpuUsage() const diff --git a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp index 1be927ae90..946f150e70 100644 --- a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp +++ b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp @@ -169,7 +169,7 @@ public: error << "The device \"" << deviceID << "\" is not available."; else error << "Could not open " << (forInput ? "input" : "output") << " device \"" << deviceID - << "\": " << snd_strerror(err) << " (" << err << ")"; + << "\": " << snd_strerror (err) << " (" << err << ")"; JUCE_ALSA_LOG ("snd_pcm_open failed; " << error); } diff --git a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp index eb46baf7bc..ec660d409a 100644 --- a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp +++ b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp @@ -1453,7 +1453,7 @@ public: HKEY hk = 0; int index = 0; - if (RegOpenKey (HKEY_LOCAL_MACHINE, _T("software\\asio"), &hk) == ERROR_SUCCESS) + if (RegOpenKey (HKEY_LOCAL_MACHINE, _T ("software\\asio"), &hk) == ERROR_SUCCESS) { TCHAR name[256] = {}; @@ -1554,7 +1554,7 @@ private: HKEY hk = 0; bool ok = false; - if (RegOpenKey (HKEY_CLASSES_ROOT, _T("clsid"), &hk) == ERROR_SUCCESS) + if (RegOpenKey (HKEY_CLASSES_ROOT, _T ("clsid"), &hk) == ERROR_SUCCESS) { int index = 0; TCHAR name[512] = {}; @@ -1567,7 +1567,7 @@ private: if (RegOpenKeyEx (hk, name, 0, KEY_READ, &subKey) == ERROR_SUCCESS) { - if (RegOpenKeyEx (subKey, _T("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS) + if (RegOpenKeyEx (subKey, _T ("InprocServer32"), 0, KEY_READ, &pathKey) == ERROR_SUCCESS) { TCHAR pathName[1024] = {}; DWORD dtype = REG_SZ; @@ -1610,7 +1610,7 @@ private: DWORD dtype = REG_SZ; DWORD dsize = sizeof (buf); - if (RegQueryValueEx (subKey, _T("clsid"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) + if (RegQueryValueEx (subKey, _T ("clsid"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) { if (dsize > 0 && checkClassIsOk (buf)) { @@ -1622,7 +1622,7 @@ private: dsize = sizeof (buf); String deviceName; - if (RegQueryValueEx (subKey, _T("description"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) + if (RegQueryValueEx (subKey, _T ("description"), 0, &dtype, (LPBYTE) buf, &dsize) == ERROR_SUCCESS) deviceName = buf; else deviceName = keyName; diff --git a/modules/juce_audio_devices/native/juce_Audio_android.cpp b/modules/juce_audio_devices/native/juce_Audio_android.cpp index b654dae640..0dee58fd91 100644 --- a/modules/juce_audio_devices/native/juce_Audio_android.cpp +++ b/modules/juce_audio_devices/native/juce_Audio_android.cpp @@ -191,9 +191,9 @@ public: if (numClientOutputChannels > 0) { numDeviceOutputChannels = 2; - outputDevice = GlobalRef (LocalRef(env->NewObject (AudioTrack, AudioTrack.constructor, - STREAM_MUSIC, sampleRate, CHANNEL_OUT_STEREO, ENCODING_PCM_16BIT, - (jint) (minBufferSizeOut * numDeviceOutputChannels * static_cast (sizeof (int16))), MODE_STREAM))); + outputDevice = GlobalRef (LocalRef (env->NewObject (AudioTrack, AudioTrack.constructor, + STREAM_MUSIC, sampleRate, CHANNEL_OUT_STEREO, ENCODING_PCM_16BIT, + (jint) (minBufferSizeOut * numDeviceOutputChannels * static_cast (sizeof (int16))), MODE_STREAM))); const bool supportsUnderrunCount = (getAndroidSDKVersion() >= 24); getUnderrunCount = supportsUnderrunCount ? env->GetMethodID (AudioTrack, "getUnderrunCount", "()I") : nullptr; @@ -225,11 +225,11 @@ public: else { numDeviceInputChannels = jmin (numClientInputChannels, numDeviceInputChannelsAvailable); - inputDevice = GlobalRef (LocalRef(env->NewObject (AudioRecord, AudioRecord.constructor, - 0 /* (default audio source) */, sampleRate, - numDeviceInputChannelsAvailable > 1 ? CHANNEL_IN_STEREO : CHANNEL_IN_MONO, - ENCODING_PCM_16BIT, - (jint) (minBufferSizeIn * numDeviceInputChannels * static_cast (sizeof (int16)))))); + inputDevice = GlobalRef (LocalRef (env->NewObject (AudioRecord, AudioRecord.constructor, + 0 /* (default audio source) */, sampleRate, + numDeviceInputChannelsAvailable > 1 ? CHANNEL_IN_STEREO : CHANNEL_IN_MONO, + ENCODING_PCM_16BIT, + (jint) (minBufferSizeIn * numDeviceInputChannels * static_cast (sizeof (int16)))))); int inputDeviceState = env->CallIntMethod (inputDevice, AudioRecord.getState); if (inputDeviceState > 0) diff --git a/modules/juce_audio_devices/native/juce_Audio_ios.cpp b/modules/juce_audio_devices/native/juce_Audio_ios.cpp index 3b44269ba1..96ed23dc69 100644 --- a/modules/juce_audio_devices/native/juce_Audio_ios.cpp +++ b/modules/juce_audio_devices/native/juce_Audio_ios.cpp @@ -726,12 +726,12 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater CFURLRef hostUrl; UInt32 dataSize = sizeof (hostUrl); - OSStatus err = AudioUnitGetProperty(audioUnit, - kAudioUnitProperty_PeerURL, - kAudioUnitScope_Global, - 0, - &hostUrl, - &dataSize); + OSStatus err = AudioUnitGetProperty (audioUnit, + kAudioUnitProperty_PeerURL, + kAudioUnitScope_Global, + 0, + &hostUrl, + &dataSize); if (err == noErr) { if (@available (iOS 10.0, *)) @@ -993,7 +993,7 @@ struct iOSAudioIODevice::Pimpl : public AsyncUpdater appDesc.componentFlags = 0; appDesc.componentFlagsMask = 0; OSStatus err = AudioOutputUnitPublish (&appDesc, - CFSTR(JucePlugin_IAAName), + CFSTR (JucePlugin_IAAName), JucePlugin_VersionCode, audioUnit); diff --git a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp index 03e14ecb20..1cef003b7d 100644 --- a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp +++ b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp @@ -1448,7 +1448,7 @@ public: outputWrapper (*this, std::move (outputDevice), false) { if (getAvailableSampleRates().isEmpty()) - lastError = TRANS("The input and output devices don't share a common sample rate!"); + lastError = TRANS ("The input and output devices don't share a common sample rate!"); } ~AudioIODeviceCombiner() override @@ -1697,7 +1697,7 @@ public: if (! forwarder.encounteredError() && newCallback != nullptr) newCallback->audioDeviceAboutToStart (this); else if (lastError.isEmpty()) - lastError = TRANS("Failed to initialise all requested devices."); + lastError = TRANS ("Failed to initialise all requested devices."); } const ScopedLock sl (callbackLock); diff --git a/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp b/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp index 28a102ac41..99c4d0fb74 100644 --- a/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp +++ b/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp @@ -37,46 +37,46 @@ extern "C" #undef INTERFACE #define INTERFACE IDirectSound - DECLARE_INTERFACE_(IDirectSound, IUnknown) + DECLARE_INTERFACE_ (IDirectSound, IUnknown) { - STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - STDMETHOD(CreateSoundBuffer) (THIS_ DSBUFFERDESC*, IDirectSoundBuffer**, LPUNKNOWN) PURE; - STDMETHOD(GetCaps) (THIS_ void*) PURE; - STDMETHOD(DuplicateSoundBuffer) (THIS_ IDirectSoundBuffer*, IDirectSoundBuffer**) PURE; - STDMETHOD(SetCooperativeLevel) (THIS_ HWND, DWORD) PURE; - STDMETHOD(Compact) (THIS) PURE; - STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD) PURE; - STDMETHOD(SetSpeakerConfig) (THIS_ DWORD) PURE; - STDMETHOD(Initialize) (THIS_ const GUID*) PURE; + STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE; + STDMETHOD_ (ULONG,AddRef) (THIS) PURE; + STDMETHOD_ (ULONG,Release) (THIS) PURE; + STDMETHOD (CreateSoundBuffer) (THIS_ DSBUFFERDESC*, IDirectSoundBuffer**, LPUNKNOWN) PURE; + STDMETHOD (GetCaps) (THIS_ void*) PURE; + STDMETHOD (DuplicateSoundBuffer) (THIS_ IDirectSoundBuffer*, IDirectSoundBuffer**) PURE; + STDMETHOD (SetCooperativeLevel) (THIS_ HWND, DWORD) PURE; + STDMETHOD (Compact) (THIS) PURE; + STDMETHOD (GetSpeakerConfig) (THIS_ LPDWORD) PURE; + STDMETHOD (SetSpeakerConfig) (THIS_ DWORD) PURE; + STDMETHOD (Initialize) (THIS_ const GUID*) PURE; }; #undef INTERFACE #define INTERFACE IDirectSoundBuffer - DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown) + DECLARE_INTERFACE_ (IDirectSoundBuffer, IUnknown) { - STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - STDMETHOD(GetCaps) (THIS_ void*) PURE; - STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE; - STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE; - STDMETHOD(GetVolume) (THIS_ LPLONG) PURE; - STDMETHOD(GetPan) (THIS_ LPLONG) PURE; - STDMETHOD(GetFrequency) (THIS_ LPDWORD) PURE; - STDMETHOD(GetStatus) (THIS_ LPDWORD) PURE; - STDMETHOD(Initialize) (THIS_ IDirectSound*, DSBUFFERDESC*) PURE; - STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE; - STDMETHOD(Play) (THIS_ DWORD, DWORD, DWORD) PURE; - STDMETHOD(SetCurrentPosition) (THIS_ DWORD) PURE; - STDMETHOD(SetFormat) (THIS_ const WAVEFORMATEX*) PURE; - STDMETHOD(SetVolume) (THIS_ LONG) PURE; - STDMETHOD(SetPan) (THIS_ LONG) PURE; - STDMETHOD(SetFrequency) (THIS_ DWORD) PURE; - STDMETHOD(Stop) (THIS) PURE; - STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE; - STDMETHOD(Restore) (THIS) PURE; + STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE; + STDMETHOD_ (ULONG,AddRef) (THIS) PURE; + STDMETHOD_ (ULONG,Release) (THIS) PURE; + STDMETHOD (GetCaps) (THIS_ void*) PURE; + STDMETHOD (GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE; + STDMETHOD (GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE; + STDMETHOD (GetVolume) (THIS_ LPLONG) PURE; + STDMETHOD (GetPan) (THIS_ LPLONG) PURE; + STDMETHOD (GetFrequency) (THIS_ LPDWORD) PURE; + STDMETHOD (GetStatus) (THIS_ LPDWORD) PURE; + STDMETHOD (Initialize) (THIS_ IDirectSound*, DSBUFFERDESC*) PURE; + STDMETHOD (Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE; + STDMETHOD (Play) (THIS_ DWORD, DWORD, DWORD) PURE; + STDMETHOD (SetCurrentPosition) (THIS_ DWORD) PURE; + STDMETHOD (SetFormat) (THIS_ const WAVEFORMATEX*) PURE; + STDMETHOD (SetVolume) (THIS_ LONG) PURE; + STDMETHOD (SetPan) (THIS_ LONG) PURE; + STDMETHOD (SetFrequency) (THIS_ DWORD) PURE; + STDMETHOD (Stop) (THIS) PURE; + STDMETHOD (Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE; + STDMETHOD (Restore) (THIS) PURE; }; //============================================================================== @@ -93,32 +93,32 @@ extern "C" #undef INTERFACE #define INTERFACE IDirectSoundCapture - DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown) + DECLARE_INTERFACE_ (IDirectSoundCapture, IUnknown) { - STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - STDMETHOD(CreateCaptureBuffer) (THIS_ DSCBUFFERDESC*, IDirectSoundCaptureBuffer**, LPUNKNOWN) PURE; - STDMETHOD(GetCaps) (THIS_ void*) PURE; - STDMETHOD(Initialize) (THIS_ const GUID*) PURE; + STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE; + STDMETHOD_ (ULONG,AddRef) (THIS) PURE; + STDMETHOD_ (ULONG,Release) (THIS) PURE; + STDMETHOD (CreateCaptureBuffer) (THIS_ DSCBUFFERDESC*, IDirectSoundCaptureBuffer**, LPUNKNOWN) PURE; + STDMETHOD (GetCaps) (THIS_ void*) PURE; + STDMETHOD (Initialize) (THIS_ const GUID*) PURE; }; #undef INTERFACE #define INTERFACE IDirectSoundCaptureBuffer - DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown) + DECLARE_INTERFACE_ (IDirectSoundCaptureBuffer, IUnknown) { - STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID*) PURE; - STDMETHOD_(ULONG,AddRef) (THIS) PURE; - STDMETHOD_(ULONG,Release) (THIS) PURE; - STDMETHOD(GetCaps) (THIS_ void*) PURE; - STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE; - STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE; - STDMETHOD(GetStatus) (THIS_ LPDWORD) PURE; - STDMETHOD(Initialize) (THIS_ IDirectSoundCapture*, DSCBUFFERDESC*) PURE; - STDMETHOD(Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE; - STDMETHOD(Start) (THIS_ DWORD) PURE; - STDMETHOD(Stop) (THIS) PURE; - STDMETHOD(Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE; + STDMETHOD (QueryInterface) (THIS_ REFIID, LPVOID*) PURE; + STDMETHOD_ (ULONG,AddRef) (THIS) PURE; + STDMETHOD_ (ULONG,Release) (THIS) PURE; + STDMETHOD (GetCaps) (THIS_ void*) PURE; + STDMETHOD (GetCurrentPosition) (THIS_ LPDWORD, LPDWORD) PURE; + STDMETHOD (GetFormat) (THIS_ LPWAVEFORMATEX, DWORD, LPDWORD) PURE; + STDMETHOD (GetStatus) (THIS_ LPDWORD) PURE; + STDMETHOD (Initialize) (THIS_ IDirectSoundCapture*, DSCBUFFERDESC*) PURE; + STDMETHOD (Lock) (THIS_ DWORD, DWORD, LPVOID*, LPDWORD, LPVOID*, LPDWORD, DWORD) PURE; + STDMETHOD (Start) (THIS_ DWORD) PURE; + STDMETHOD (Stop) (THIS) PURE; + STDMETHOD (Unlock) (THIS_ LPVOID, DWORD, LPVOID, DWORD) PURE; }; #undef INTERFACE @@ -136,24 +136,24 @@ namespace DSoundLogging switch (hr) { - case MAKE_HRESULT(1, 0x878, 10): result = "Device already allocated"; break; - case MAKE_HRESULT(1, 0x878, 30): result = "Control unavailable"; break; - case E_INVALIDARG: result = "Invalid parameter"; break; - case MAKE_HRESULT(1, 0x878, 50): result = "Invalid call"; break; - case E_FAIL: result = "Generic error"; break; - case MAKE_HRESULT(1, 0x878, 70): result = "Priority level error"; break; - case E_OUTOFMEMORY: result = "Out of memory"; break; - case MAKE_HRESULT(1, 0x878, 100): result = "Bad format"; break; - case E_NOTIMPL: result = "Unsupported function"; break; - case MAKE_HRESULT(1, 0x878, 120): result = "No driver"; break; - case MAKE_HRESULT(1, 0x878, 130): result = "Already initialised"; break; - case CLASS_E_NOAGGREGATION: result = "No aggregation"; break; - case MAKE_HRESULT(1, 0x878, 150): result = "Buffer lost"; break; - case MAKE_HRESULT(1, 0x878, 160): result = "Another app has priority"; break; - case MAKE_HRESULT(1, 0x878, 170): result = "Uninitialised"; break; - case E_NOINTERFACE: result = "No interface"; break; - case S_OK: result = "No error"; break; - default: return "Unknown error: " + String ((int) hr); + case MAKE_HRESULT (1, 0x878, 10): result = "Device already allocated"; break; + case MAKE_HRESULT (1, 0x878, 30): result = "Control unavailable"; break; + case E_INVALIDARG: result = "Invalid parameter"; break; + case MAKE_HRESULT (1, 0x878, 50): result = "Invalid call"; break; + case E_FAIL: result = "Generic error"; break; + case MAKE_HRESULT (1, 0x878, 70): result = "Priority level error"; break; + case E_OUTOFMEMORY: result = "Out of memory"; break; + case MAKE_HRESULT (1, 0x878, 100): result = "Bad format"; break; + case E_NOTIMPL: result = "Unsupported function"; break; + case MAKE_HRESULT (1, 0x878, 120): result = "No driver"; break; + case MAKE_HRESULT (1, 0x878, 130): result = "Already initialised"; break; + case CLASS_E_NOAGGREGATION: result = "No aggregation"; break; + case MAKE_HRESULT (1, 0x878, 150): result = "Buffer lost"; break; + case MAKE_HRESULT (1, 0x878, 160): result = "Another app has priority"; break; + case MAKE_HRESULT (1, 0x878, 170): result = "Uninitialised"; break; + case E_NOINTERFACE: result = "No interface"; break; + case S_OK: result = "No error"; break; + default: return "Unknown error: " + String ((int) hr); } return result; @@ -753,14 +753,14 @@ public: { if (outputDeviceIndex_ >= 0) { - outChannels.add (TRANS("Left")); - outChannels.add (TRANS("Right")); + outChannels.add (TRANS ("Left")); + outChannels.add (TRANS ("Right")); } if (inputDeviceIndex_ >= 0) { - inChannels.add (TRANS("Left")); - inChannels.add (TRANS("Right")); + inChannels.add (TRANS ("Left")); + inChannels.add (TRANS ("Right")); } } @@ -923,10 +923,10 @@ private: sleep (5); for (int i = 0; i < outChans.size(); ++i) - outChans.getUnchecked(i)->synchronisePosition(); + outChans.getUnchecked (i)->synchronisePosition(); for (int i = 0; i < inChans.size(); ++i) - inChans.getUnchecked(i)->synchronisePosition(); + inChans.getUnchecked (i)->synchronisePosition(); } } @@ -949,13 +949,13 @@ public: for (int i = inChans.size(); --i >= 0;) { - inChans.getUnchecked(i)->doneFlag = false; + inChans.getUnchecked (i)->doneFlag = false; ++numToDo; } for (int i = outChans.size(); --i >= 0;) { - outChans.getUnchecked(i)->doneFlag = false; + outChans.getUnchecked (i)->doneFlag = false; ++numToDo; } @@ -968,7 +968,7 @@ public: { for (int i = inChans.size(); --i >= 0;) { - DSoundInternalInChannel* const in = inChans.getUnchecked(i); + DSoundInternalInChannel* const in = inChans.getUnchecked (i); if ((! in->doneFlag) && in->service()) { @@ -979,7 +979,7 @@ public: for (int i = outChans.size(); --i >= 0;) { - DSoundInternalOutChannel* const out = outChans.getUnchecked(i); + DSoundInternalOutChannel* const out = outChans.getUnchecked (i); if ((! out->doneFlag) && out->service()) { @@ -1192,10 +1192,10 @@ String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels, if (error.isEmpty()) { for (int i = 0; i < outChans.size(); ++i) - outChans.getUnchecked(i)->synchronisePosition(); + outChans.getUnchecked (i)->synchronisePosition(); for (int i = 0; i < inChans.size(); ++i) - inChans.getUnchecked(i)->synchronisePosition(); + inChans.getUnchecked (i)->synchronisePosition(); startThread (Priority::highest); sleep (10); diff --git a/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp b/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp index 6e86ecb301..db89433572 100644 --- a/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp +++ b/modules/juce_audio_devices/native/juce_JackAudio_linux.cpp @@ -59,12 +59,12 @@ JUCE_DECL_JACK_FUNCTION (int, jack_activate, (jack_client_t* client), (client)) JUCE_DECL_JACK_FUNCTION (int, jack_deactivate, (jack_client_t* client), (client)) JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_get_buffer_size, (jack_client_t* client), (client)) JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_get_sample_rate, (jack_client_t* client), (client)) -JUCE_DECL_VOID_JACK_FUNCTION (jack_on_shutdown, (jack_client_t* client, void (*function)(void* arg), void* arg), (client, function, arg)) +JUCE_DECL_VOID_JACK_FUNCTION (jack_on_shutdown, (jack_client_t* client, void (*function) (void* arg), void* arg), (client, function, arg)) JUCE_DECL_VOID_JACK_FUNCTION (jack_on_info_shutdown, (jack_client_t* client, JackInfoShutdownCallback function, void* arg), (client, function, arg)) JUCE_DECL_JACK_FUNCTION (void* , jack_port_get_buffer, (jack_port_t* port, jack_nframes_t nframes), (port, nframes)) JUCE_DECL_JACK_FUNCTION (jack_nframes_t, jack_port_get_total_latency, (jack_client_t* client, jack_port_t* port), (client, port)) JUCE_DECL_JACK_FUNCTION (jack_port_t* , jack_port_register, (jack_client_t* client, const char* port_name, const char* port_type, unsigned long flags, unsigned long buffer_size), (client, port_name, port_type, flags, buffer_size)) -JUCE_DECL_VOID_JACK_FUNCTION (jack_set_error_function, (void (*func)(const char*)), (func)) +JUCE_DECL_VOID_JACK_FUNCTION (jack_set_error_function, (void (*func) (const char*)), (func)) JUCE_DECL_JACK_FUNCTION (int, jack_set_process_callback, (jack_client_t* client, JackProcessCallback process_callback, void* arg), (client, process_callback, arg)) JUCE_DECL_JACK_FUNCTION (const char**, jack_get_ports, (jack_client_t* client, const char* port_name_pattern, const char* type_name_pattern, unsigned long flags), (client, port_name_pattern, type_name_pattern, flags)) JUCE_DECL_JACK_FUNCTION (int, jack_connect, (jack_client_t* client, const char* source_port, const char* destination_port), (client, source_port, destination_port)) diff --git a/modules/juce_audio_devices/native/juce_Midi_android.cpp b/modules/juce_audio_devices/native/juce_Midi_android.cpp index 2b4f417668..319ac4e523 100644 --- a/modules/juce_audio_devices/native/juce_Midi_android.cpp +++ b/modules/juce_audio_devices/native/juce_Midi_android.cpp @@ -971,7 +971,7 @@ public: if (auto dm = deviceManager.get()) { if (auto javaMidiPort = getEnv()->CallObjectMethod (dm, MidiDeviceManager.openMidiOutputPortWithID, (jint) deviceID)) - return new MidiOutput::Pimpl (LocalRef(javaMidiPort)); + return new MidiOutput::Pimpl (LocalRef (javaMidiPort)); // Perhaps the port is already open jassertfalse; diff --git a/modules/juce_audio_devices/native/juce_Midi_windows.cpp b/modules/juce_audio_devices/native/juce_Midi_windows.cpp index 05ee23d6c1..da6656b110 100644 --- a/modules/juce_audio_devices/native/juce_Midi_windows.cpp +++ b/modules/juce_audio_devices/native/juce_Midi_windows.cpp @@ -707,7 +707,7 @@ private: const ScopedLock sl (activeCollectorLock); for (int i = activeCollectors.size(); --i >= 0;) - if (activeCollectors.getObjectPointer(i)->getReferenceCount() == 1) + if (activeCollectors.getObjectPointer (i)->getReferenceCount() == 1) activeCollectors.remove (i); } diff --git a/modules/juce_audio_devices/native/juce_Oboe_android.cpp b/modules/juce_audio_devices/native/juce_Oboe_android.cpp index 95d00d3cb3..7e3cef2c99 100644 --- a/modules/juce_audio_devices/native/juce_Oboe_android.cpp +++ b/modules/juce_audio_devices/native/juce_Oboe_android.cpp @@ -1344,7 +1344,7 @@ public: return testStream != nullptr && testStream->openedOk(); } - pthread_t startThread (void*(*entry)(void*), void* userPtr) + pthread_t startThread (void*(*entry) (void*), void* userPtr) { pthread_mutex_lock (&threadReadyMutex); diff --git a/modules/juce_audio_devices/native/juce_OpenSL_android.cpp b/modules/juce_audio_devices/native/juce_OpenSL_android.cpp index f0e6d939ac..019da065e9 100644 --- a/modules/juce_audio_devices/native/juce_OpenSL_android.cpp +++ b/modules/juce_audio_devices/native/juce_OpenSL_android.cpp @@ -362,7 +362,7 @@ public: &audioRoutingJni); if (status == SL_RESULT_SUCCESS && audioRoutingJni != nullptr) - javaProxy = GlobalRef (LocalRef(getEnv()->NewLocalRef (audioRoutingJni))); + javaProxy = GlobalRef (LocalRef (getEnv()->NewLocalRef (audioRoutingJni))); } } @@ -391,7 +391,7 @@ public: } bool isBufferAvailable() const { return (numBlocksOut.get() < owner.numBuffers); } - T* getNextBuffer() { nextBlock.set((nextBlock.get() + 1) % owner.numBuffers); return getCurrentBuffer(); } + T* getNextBuffer() { nextBlock.set ((nextBlock.get() + 1) % owner.numBuffers); return getCurrentBuffer(); } T* getCurrentBuffer() { return nativeBuffer.get() + (static_cast (nextBlock.get()) * getBufferSizeInSamples()); } size_t getBufferSizeInSamples() const { return static_cast (owner.bufferSize * numChannels); } @@ -458,7 +458,7 @@ public: auto status = e->CreateAudioPlayer (holder.engine, &obj, &source, &sink, 2, queueInterfaces, interfaceRequired); - if (status != SL_RESULT_SUCCESS || obj == nullptr || (*obj)->Realize(obj, 0) != SL_RESULT_SUCCESS) + if (status != SL_RESULT_SUCCESS || obj == nullptr || (*obj)->Realize (obj, 0) != SL_RESULT_SUCCESS) { destroyObject (obj); return {}; @@ -611,7 +611,7 @@ public: else { for (int i = 0; i < outputChannels; ++i) - zeromem (outputChannelData[i], sizeof(float) * static_cast (bufferSize)); + zeromem (outputChannelData[i], sizeof (float) * static_cast (bufferSize)); } } @@ -913,7 +913,7 @@ public: if (numInputChannels > 0 && numOutputChannels > 0 && RuntimePermissions::isGranted (RuntimePermissions::recordAudio)) { // New versions of the Android emulator do not seem to support audio input anymore on OS X - activeInputChans = BigInteger(0); + activeInputChans = BigInteger (0); numInputChannels = 0; session.reset (OpenSLSession::create (numInputChannels, numOutputChannels, diff --git a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp index d226f97ff9..b7edd0e4e5 100644 --- a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp +++ b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp @@ -1366,7 +1366,7 @@ public: if (sampleRates.size() == 0 && inputDevice != nullptr && outputDevice != nullptr) { - lastError = TRANS("The input and output devices don't share a common sample rate!"); + lastError = TRANS ("The input and output devices don't share a common sample rate!"); return lastError; } @@ -1377,14 +1377,14 @@ public: if (inputDevice != nullptr && ! inputDevice->open (currentSampleRate, inputChannels, bufferSizeSamples)) { - lastError = TRANS("Couldn't open the input device!"); + lastError = TRANS ("Couldn't open the input device!"); return lastError; } if (outputDevice != nullptr && ! outputDevice->open (currentSampleRate, outputChannels, bufferSizeSamples)) { close(); - lastError = TRANS("Couldn't open the output device!"); + lastError = TRANS ("Couldn't open the output device!"); return lastError; } @@ -1394,7 +1394,7 @@ public: if (inputDevice != nullptr && outputDevice != nullptr && inputDevice->actualBufferSize != outputDevice->actualBufferSize) { close(); - lastError = TRANS("Couldn't open the output device (buffer size mismatch)"); + lastError = TRANS ("Couldn't open the output device (buffer size mismatch)"); return lastError; } @@ -1418,7 +1418,7 @@ public: if (! inputDevice->start (currentBufferSizeSamples)) { close(); - lastError = TRANS("Couldn't start the input device!"); + lastError = TRANS ("Couldn't start the input device!"); return lastError; } } @@ -1430,7 +1430,7 @@ public: if (! outputDevice->start()) { close(); - lastError = TRANS("Couldn't start the output device!"); + lastError = TRANS ("Couldn't start the output device!"); return lastError; } } @@ -1823,7 +1823,7 @@ private: JUCE_COMRESULT OnDeviceAdded (LPCWSTR) { return notify(); } JUCE_COMRESULT OnDeviceRemoved (LPCWSTR) { return notify(); } - JUCE_COMRESULT OnDeviceStateChanged(LPCWSTR, DWORD) { return notify(); } + JUCE_COMRESULT OnDeviceStateChanged (LPCWSTR, DWORD) { return notify(); } JUCE_COMRESULT OnDefaultDeviceChanged (EDataFlow, ERole, LPCWSTR) { return notify(); } JUCE_COMRESULT OnPropertyValueChanged (LPCWSTR, const PROPERTYKEY) { return notify(); } diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h index 2396b3bafb..0315ee46d7 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h @@ -88,7 +88,7 @@ public: using AudioFormat::createWriterFor; private: - JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AiffAudioFormat) + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AiffAudioFormat) }; } // namespace juce diff --git a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp index 034dcbcdb3..aa02a5c91e 100644 --- a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp @@ -267,7 +267,7 @@ struct CoreAudioFormatMetatdata for (int i = 0; i < numTimeSigEvents; ++i) { int numerator, denominator; - timeSigEvents.getEventPointer(i)->message.getTimeSignatureInfo (numerator, denominator); + timeSigEvents.getEventPointer (i)->message.getTimeSignatureInfo (numerator, denominator); String timeSigString; timeSigString << numerator << '/' << denominator; diff --git a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp index dfdba2e9de..e709b0c2f6 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatWriter.cpp @@ -35,7 +35,7 @@ AudioFormatWriter::AudioFormatWriter (OutputStream* const out, numChannels (numChannels_), bitsPerSample (bitsPerSample_), usesFloatingPointData (false), - channelLayout (AudioChannelSet::canonicalChannelSet(static_cast (numChannels_))), + channelLayout (AudioChannelSet::canonicalChannelSet (static_cast (numChannels_))), output (out), formatName (formatName_) { diff --git a/modules/juce_audio_plugin_client/AU/AudioUnitSDK/AUBufferAllocator.cpp b/modules/juce_audio_plugin_client/AU/AudioUnitSDK/AUBufferAllocator.cpp index 577ccbf017..35cc8e4de8 100644 --- a/modules/juce_audio_plugin_client/AU/AudioUnitSDK/AUBufferAllocator.cpp +++ b/modules/juce_audio_plugin_client/AU/AudioUnitSDK/AUBufferAllocator.cpp @@ -8,7 +8,7 @@ namespace ausdk { BufferAllocator& BufferAllocator::instance() { - __attribute__((no_destroy)) static BufferAllocator global; + __attribute__ ((no_destroy)) static BufferAllocator global; return global; } diff --git a/modules/juce_audio_plugin_client/AU/AudioUnitSDK/ComponentBase.cpp b/modules/juce_audio_plugin_client/AU/AudioUnitSDK/ComponentBase.cpp index d043591226..c3331ff1e6 100644 --- a/modules/juce_audio_plugin_client/AU/AudioUnitSDK/ComponentBase.cpp +++ b/modules/juce_audio_plugin_client/AU/AudioUnitSDK/ComponentBase.cpp @@ -16,7 +16,7 @@ static OSStatus CB_GetComponentDescription( std::recursive_mutex& ComponentBase::InitializationMutex() { - __attribute__((no_destroy)) static std::recursive_mutex global; + __attribute__ ((no_destroy)) static std::recursive_mutex global; return global; } diff --git a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h index 349b231130..7799d3db24 100644 --- a/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h +++ b/modules/juce_audio_plugin_client/Standalone/juce_StandaloneFilterWindow.h @@ -186,7 +186,7 @@ public: /** Pops up a dialog letting the user save the processor's state to a file. */ void askUserToSaveState (const String& fileSuffix = String()) { - stateFileChooser = std::make_unique (TRANS("Save current state"), + stateFileChooser = std::make_unique (TRANS ("Save current state"), getLastFile(), getFilePatterns (fileSuffix)); auto flags = FileBrowserComponent::saveMode @@ -216,7 +216,7 @@ public: /** Pops up a dialog letting the user re-load the processor's state from a file. */ void askUserToLoadState (const String& fileSuffix = String()) { - stateFileChooser = std::make_unique (TRANS("Load a saved state"), + stateFileChooser = std::make_unique (TRANS ("Load a saved state"), getLastFile(), getFilePatterns (fileSuffix)); auto flags = FileBrowserComponent::openMode @@ -292,7 +292,7 @@ public: o.content.setOwned (content.release()); - o.dialogTitle = TRANS("Audio/MIDI Settings"); + o.dialogTitle = TRANS ("Audio/MIDI Settings"); o.dialogBackgroundColour = o.content->getLookAndFeel().findColour (ResizableWindow::backgroundColourId); o.escapeKeyTriggersCloseButton = true; o.useNativeTitleBar = true; @@ -885,12 +885,12 @@ private: void buttonClicked (Button*) override { PopupMenu m; - m.addItem (1, TRANS("Audio/MIDI Settings...")); + m.addItem (1, TRANS ("Audio/MIDI Settings...")); m.addSeparator(); - m.addItem (2, TRANS("Save current state...")); - m.addItem (3, TRANS("Load a saved state...")); + m.addItem (2, TRANS ("Save current state...")); + m.addItem (3, TRANS ("Load a saved state...")); m.addSeparator(); - m.addItem (4, TRANS("Reset to default state")); + m.addItem (4, TRANS ("Reset to default state")); m.showMenuAsync (PopupMenu::Options(), ModalCallbackFunction::forComponent (menuCallback, this)); diff --git a/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h b/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h index c0ce9c71ac..7e253205d9 100644 --- a/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h +++ b/modules/juce_audio_plugin_client/Unity/juce_UnityPluginInterface.h @@ -31,10 +31,10 @@ #if JUCE_WINDOWS #define UNITY_INTERFACE_API __stdcall - #define UNITY_INTERFACE_EXPORT __declspec(dllexport) + #define UNITY_INTERFACE_EXPORT __declspec (dllexport) #else #define UNITY_INTERFACE_API - #define UNITY_INTERFACE_EXPORT __attribute__ ((visibility("default"))) + #define UNITY_INTERFACE_EXPORT __attribute__ ((visibility ("default"))) #endif //============================================================================== diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp index 3d774c9ecc..37bc28af56 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX.cpp @@ -2006,7 +2006,7 @@ namespace AAXClasses i.pluginInstance->parameters.process (i.inputChannels, i.outputChannels, sideChainBufferIdx, *(i.bufferSize), *(i.bypass) != 0, - getMidiNodeIn(i), getMidiNodeOut(i), + getMidiNodeIn (i), getMidiNodeOut (i), meterTapBuffers); } } diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp index cea4daf7d9..7efee1543a 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AAX_utils.cpp @@ -55,7 +55,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_MSVC (6001 6053 4996 5033 4068 4996) #include #include -#if defined(_WIN32) && ! defined(WIN32) +#if defined (_WIN32) && ! defined (WIN32) #define WIN32 #endif #include diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm index 72e94818e5..009fd86150 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm @@ -1557,11 +1557,11 @@ public: for (int i = 0; i < numPrograms; ++i) { - String name (juceFilter->getProgramName(i)); + String name (juceFilter->getProgramName (i)); if (name.isEmpty()) name = "Untitled"; - AUPreset& p = presetsArray.getReference(i); + AUPreset& p = presetsArray.getReference (i); p.presetNumber = i; p.presetName = name.toCFString(); @@ -1705,7 +1705,7 @@ public: void resizeHostWindow() { [CATransaction begin]; - [CATransaction setValue:(id) kCFBooleanTrue forKey:kCATransactionDisableActions]; + [CATransaction setValue: (id) kCFBooleanTrue forKey:kCATransactionDisableActions]; auto rect = convertToHostBounds (makeNSRect (lastBounds)); auto* view = (NSView*) getWindowHandle(); @@ -1731,7 +1731,7 @@ public: { for (int i = activeUIs.size(); --i >= 0;) { - id ui = (id) activeUIs.getUnchecked(i); + id ui = (id) activeUIs.getUnchecked (i); if (JuceUIViewClass::getAU (ui) == this) JuceUIViewClass::deleteEditor (ui); @@ -1761,11 +1761,11 @@ public: if (editorComp != nullptr) { - if (editorComp->getChildComponent(0) != nullptr + if (editorComp->getChildComponent (0) != nullptr && activePlugins.contains (getAU (self))) // plugin may have been deleted before the UI { AudioProcessor* const filter = getIvar (self, "filter"); - filter->editorBeingDeleted ((AudioProcessorEditor*) editorComp->getChildComponent(0)); + filter->editorBeingDeleted ((AudioProcessorEditor*) editorComp->getChildComponent (0)); } editorComp = nullptr; @@ -2554,7 +2554,7 @@ private: void clearPresetsArray() const { for (int i = presetsArray.size(); --i >= 0;) - CFRelease (presetsArray.getReference(i).presetName); + CFRelease (presetsArray.getReference (i).presetName); presetsArray.clear(); } diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm index 2251d8023c..b75c811956 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AUv3.mm @@ -758,7 +758,7 @@ private: AUAudioUnit* self = _self; self = ObjCMsgSendSuper (self, @selector(initWithComponentDescription:options:error:), descr, options, error); + AudioComponentInstantiationOptions, NSError**> (self, @selector (initWithComponentDescription:options:error:), descr, options, error); setThis (self, juceAU); return self; @@ -1183,16 +1183,16 @@ private: @try { // Create methods in AUParameterTree return unretained objects (!) -> see Apple header AUAudioUnitImplementation.h - param.reset([[AUParameterTree createParameterWithIdentifier: juceStringToNS (getParameterIdentifier()) - name: juceStringToNS (name) - address: address - min: 0.0f - max: getMaximumParameterValue (parameter) - unit: unit - unitName: nullptr - flags: flags - valueStrings: valueStrings.get() - dependentParameters: nullptr] + param.reset ([[AUParameterTree createParameterWithIdentifier: juceStringToNS (getParameterIdentifier()) + name: juceStringToNS (name) + address: address + min: 0.0f + max: getMaximumParameterValue (parameter) + unit: unit + unitName: nullptr + flags: flags + valueStrings: valueStrings.get() + dependentParameters: nullptr] retain]); } diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp index 5a61223f19..5eb4dfb7b5 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_Standalone.cpp @@ -189,7 +189,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE #endif #else - JUCE_CREATE_APPLICATION_DEFINE(juce::StandaloneFilterApp) + JUCE_CREATE_APPLICATION_DEFINE (juce::StandaloneFilterApp) #endif #if ! JUCE_USE_CUSTOM_PLUGIN_STANDALONE_ENTRYPOINT diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp index f61c2459a8..e2c3e00df6 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST2.cpp @@ -388,7 +388,7 @@ public: int i; for (i = 0; i < numOut; ++i) { - auto* chan = tmpBuffers.tempChannels.getUnchecked(i); + auto* chan = tmpBuffers.tempChannels.getUnchecked (i); if (chan == nullptr) { @@ -444,7 +444,7 @@ public: // copy back any temp channels that may have been used.. for (i = 0; i < numOut; ++i) - if (auto* chan = tmpBuffers.tempChannels.getUnchecked(i)) + if (auto* chan = tmpBuffers.tempChannels.getUnchecked (i)) if (auto* dest = outputs[i]) memcpy (dest, chan, (size_t) numSamples * sizeof (FloatType)); } @@ -2131,7 +2131,7 @@ namespace } #if ! JUCE_WINDOWS - #define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility("default"))) + #define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility ("default"))) #endif JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") @@ -2169,8 +2169,8 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") } // don't put initialiseJuce_GUI or shutdownJuce_GUI in these... it will crash! - __attribute__((constructor)) void myPluginInit() {} - __attribute__((destructor)) void myPluginFini() {} + __attribute__ ((constructor)) void myPluginInit() {} + __attribute__ ((destructor)) void myPluginFini() {} //============================================================================== // Win32 startup code.. diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp index 29517a9511..5bfbfa018d 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_VST3.cpp @@ -90,7 +90,7 @@ JUCE_BEGIN_NO_SANITIZE ("vptr") //============================================================================== #if JucePlugin_Enable_ARA - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE("-Wpragma-pack") + JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wpragma-pack") #include JUCE_END_IGNORE_WARNINGS_GCC_LIKE @@ -98,9 +98,9 @@ JUCE_BEGIN_NO_SANITIZE ("vptr") #error "Unsupported ARA version - only ARA version 2 and onward are supported by the current implementation" #endif - DEF_CLASS_IID(ARA::IPlugInEntryPoint) - DEF_CLASS_IID(ARA::IPlugInEntryPoint2) - DEF_CLASS_IID(ARA::IMainFactory) + DEF_CLASS_IID (ARA::IPlugInEntryPoint) + DEF_CLASS_IID (ARA::IPlugInEntryPoint2) + DEF_CLASS_IID (ARA::IMainFactory) #endif namespace juce @@ -3124,7 +3124,7 @@ public: info.channelCount = 16; #endif - toString128 (info.name, TRANS("MIDI Input")); + toString128 (info.name, TRANS ("MIDI Input")); info.busType = Vst::kMain; return kResultTrue; } @@ -3142,7 +3142,7 @@ public: info.channelCount = 16; #endif - toString128 (info.name, TRANS("MIDI Output")); + toString128 (info.name, TRANS ("MIDI Output")); info.busType = Vst::kMain; return kResultTrue; } @@ -3864,7 +3864,7 @@ bool shutdownModule() #if JUCE_WINDOWS #define JUCE_EXPORTED_FUNCTION #else - #define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility("default"))) + #define JUCE_EXPORTED_FUNCTION extern "C" __attribute__ ((visibility ("default"))) #endif #if JUCE_WINDOWS diff --git a/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp b/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp index 46204dea43..0221fe6020 100644 --- a/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp +++ b/modules/juce_audio_processors/format_types/juce_ARAHosting.cpp @@ -472,7 +472,7 @@ void createARAFactoryAsync (AudioPluginInstance& instance, std::function callback; }; - Extensions extensions { std::move(cb) }; + Extensions extensions { std::move (cb) }; instance.getExtensions (extensions); } diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 1c987285d1..bbe61e9a9d 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -200,7 +200,7 @@ namespace AudioUnitFormatHelpers { if (auto bundleRef = CFUniquePtr (CFBundleCreate (kCFAllocatorDefault, url.get()))) { - CFTypeRef bundleName = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR("CFBundleName")); + CFTypeRef bundleName = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR ("CFBundleName")); if (bundleName != nullptr && CFGetTypeID (bundleName) == CFStringGetTypeID()) name = String::fromCFString ((CFStringRef) bundleName); @@ -208,12 +208,12 @@ namespace AudioUnitFormatHelpers if (name.isEmpty()) name = file.getFileNameWithoutExtension(); - CFTypeRef versionString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR("CFBundleVersion")); + CFTypeRef versionString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR ("CFBundleVersion")); if (versionString != nullptr && CFGetTypeID (versionString) == CFStringGetTypeID()) version = String::fromCFString ((CFStringRef) versionString); - CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR("CFBundleGetInfoString")); + CFTypeRef manuString = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR ("CFBundleGetInfoString")); if (manuString != nullptr && CFGetTypeID (manuString) == CFStringGetTypeID()) manufacturer = String::fromCFString ((CFStringRef) manuString); @@ -1603,7 +1603,7 @@ public: { AUPreset current; current.presetNumber = -1; - current.presetName = CFSTR(""); + current.presetName = CFSTR (""); UInt32 prstsz = sizeof (AUPreset); @@ -1937,7 +1937,7 @@ private: float getDefaultValue() const override { return 0.0f; } String getName (int /*maximumStringLength*/) const override { return "Bypass"; } - String getText (float value, int) const override { return (value != 0.0f ? TRANS("On") : TRANS("Off")); } + String getText (float value, int) const override { return (value != 0.0f ? TRANS ("On") : TRANS ("Off")); } bool isAutomatable() const override { return true; } bool isDiscrete() const override { return true; } bool isBoolean() const override { return true; } @@ -1948,9 +1948,9 @@ private: String getParameterID() const override { return {}; } AudioUnitPluginInstance& parent; - const StringArray auOnStrings { TRANS("on"), TRANS("yes"), TRANS("true") }; - const StringArray auOffStrings { TRANS("off"), TRANS("no"), TRANS("false") }; - const StringArray values { TRANS("Off"), TRANS("On") }; + const StringArray auOnStrings { TRANS ("on"), TRANS ("yes"), TRANS ("true") }; + const StringArray auOffStrings { TRANS ("off"), TRANS ("no"), TRANS ("false") }; + const StringArray values { TRANS ("Off"), TRANS ("On") }; bool currentValue = false; }; diff --git a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp index a84521da12..d054689cd4 100644 --- a/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp @@ -69,7 +69,7 @@ public: { for (auto i = getActiveModules().size(); --i >= 0;) { - auto* module = getActiveModules().getUnchecked(i); + auto* module = getActiveModules().getUnchecked (i); if (module->file == file) return module; @@ -300,7 +300,7 @@ public: if (plugin->run != nullptr) { for (int i = 0; i < outputs.size(); ++i) - plugin->connect_port (handle, (size_t) outputs.getUnchecked(i), + plugin->connect_port (handle, (size_t) outputs.getUnchecked (i), i < buffer.getNumChannels() ? buffer.getWritePointer (i) : nullptr); plugin->run (handle, (size_t) numSamples); @@ -313,7 +313,7 @@ public: tempBuffer.clear(); for (int i = 0; i < outputs.size(); ++i) - plugin->connect_port (handle, (size_t) outputs.getUnchecked(i), tempBuffer.getWritePointer (i)); + plugin->connect_port (handle, (size_t) outputs.getUnchecked (i), tempBuffer.getWritePointer (i)); plugin->run_adding (handle, (size_t) numSamples); diff --git a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp index e93eb9c1fb..a3a0b22c9d 100644 --- a/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_LV2PluginFormat.cpp @@ -4336,11 +4336,11 @@ public: void createView() {} void destroyView() {} - std::unique_ptr createEditor(World&, - AudioPluginInstance&, - InstanceProvider&, - TouchListener&, - EditorListener&) + std::unique_ptr createEditor (World&, + AudioPluginInstance&, + InstanceProvider&, + TouchListener&, + EditorListener&) { return nullptr; } diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index e049cc9d6c..939d22fb5b 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -485,7 +485,7 @@ struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0 { for (int i = items.size(); --i >= 0;) { - auto& item = items.getReference(i); + auto& item = items.getReference (i); if (item.item.tag == toRemove.tag && item.target == target) items.remove (i); @@ -498,7 +498,7 @@ struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0 { for (int i = 0; i < items.size(); ++i) { - auto& item = items.getReference(i); + auto& item = items.getReference (i); if (item.item.tag == tag) { @@ -545,7 +545,7 @@ struct VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0 for (int i = 0; i < items.size(); ++i) { - auto& item = items.getReference(i); + auto& item = items.getReference (i); if ((int) item.item.tag == result) { @@ -1023,7 +1023,7 @@ struct DLLHandle if (factory != nullptr) factory->release(); - using ExitModuleFn = bool (PLUGIN_API*) (); + using ExitModuleFn = bool (PLUGIN_API*)(); if (auto* exitFn = (ExitModuleFn) getFunction (exitFnName)) exitFn(); @@ -1076,7 +1076,7 @@ private: static constexpr const char* entryFnName = "InitDll"; static constexpr const char* exitFnName = "ExitDll"; - using EntryProc = bool (PLUGIN_API*) (); + using EntryProc = bool (PLUGIN_API*)(); #elif JUCE_LINUX || JUCE_BSD static constexpr const char* entryFnName = "ModuleEntry"; static constexpr const char* exitFnName = "ModuleExit"; @@ -3618,7 +3618,7 @@ private: for (int idx = 0; idx < unitCount; ++idx) { - if (unitInfo->getUnitInfo(idx, uInfo) == kResultOk + if (unitInfo->getUnitInfo (idx, uInfo) == kResultOk && uInfo.id == programUnitID) { const int programListCount = unitInfo->getProgramListCount(); diff --git a/modules/juce_audio_processors/format_types/juce_VSTCommon.h b/modules/juce_audio_processors/format_types/juce_VSTCommon.h index 851eef996b..608c074a5b 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTCommon.h +++ b/modules/juce_audio_processors/format_types/juce_VSTCommon.h @@ -185,7 +185,7 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e } } - VstSpeakerConfigurationHolder& operator= (const VstSpeakerConfigurationHolder& vstConfig) { return operator=(vstConfig.get()); } + VstSpeakerConfigurationHolder& operator= (const VstSpeakerConfigurationHolder& vstConfig) { return operator= (vstConfig.get()); } VstSpeakerConfigurationHolder& operator= (const Vst2::VstSpeakerArrangement& vstConfig) { Vst2::VstSpeakerArrangement& dst = *allocate (vstConfig.numChannels); diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 893d244f12..9a108c489b 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -379,8 +379,8 @@ public: private: VSTXMLInfo (const juce::XmlElement& xml) { - switchValueType.entries.add (new Entry({ TRANS("Off"), Range ("[0, 0.5[") })); - switchValueType.entries.add (new Entry({ TRANS("On"), Range ("[0.5, 1]") })); + switchValueType.entries.add (new Entry ({ TRANS ("Off"), Range ("[0, 0.5[") })); + switchValueType.entries.add (new Entry ({ TRANS ("On"), Range ("[0.5, 1]") })); for (auto* item : xml.getChildIterator()) { @@ -443,7 +443,7 @@ private: if (entryXml->hasAttribute ("value")) { - entry->range.set(entryXml->getStringAttribute ("value")); + entry->range.set (entryXml->getStringAttribute ("value")); } else { @@ -741,16 +741,16 @@ struct ModuleHandle : public ReferenceCountedObject { if (CFBundleLoadExecutable (bundleRef.get())) { - moduleMain = (MainCall) CFBundleGetFunctionPointerForName (bundleRef.get(), CFSTR("main_macho")); + moduleMain = (MainCall) CFBundleGetFunctionPointerForName (bundleRef.get(), CFSTR ("main_macho")); if (moduleMain == nullptr) - moduleMain = (MainCall) CFBundleGetFunctionPointerForName (bundleRef.get(), CFSTR("VSTPluginMain")); + moduleMain = (MainCall) CFBundleGetFunctionPointerForName (bundleRef.get(), CFSTR ("VSTPluginMain")); JUCE_VST_WRAPPER_LOAD_CUSTOM_MAIN if (moduleMain != nullptr) { - if (CFTypeRef name = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR("CFBundleName"))) + if (CFTypeRef name = CFBundleGetValueForInfoDictionaryKey (bundleRef.get(), CFSTR ("CFBundleName"))) { if (CFGetTypeID (name) == CFStringGetTypeID()) { @@ -778,7 +778,7 @@ struct ModuleHandle : public ReferenceCountedObject .findChildFiles (File::findFiles, false, "*.vstxml"); if (! vstXmlFiles.isEmpty()) - vstXml = parseXML (vstXmlFiles.getReference(0)); + vstXml = parseXML (vstXmlFiles.getReference (0)); } } @@ -1996,9 +1996,9 @@ private: { VST2BypassParameter (VSTPluginInstance& effectToUse) : parent (effectToUse), - vstOnStrings (TRANS("on"), TRANS("yes"), TRANS("true")), - vstOffStrings (TRANS("off"), TRANS("no"), TRANS("false")), - values (TRANS("Off"), TRANS("On")) + vstOnStrings (TRANS ("on"), TRANS ("yes"), TRANS ("true")), + vstOffStrings (TRANS ("off"), TRANS ("no"), TRANS ("false")), + values (TRANS ("Off"), TRANS ("On")) { } @@ -2028,7 +2028,7 @@ private: float getValue() const override { return currentValue; } float getDefaultValue() const override { return 0.0f; } String getName (int /*maximumStringLength*/) const override { return "Bypass"; } - String getText (float value, int) const override { return (! approximatelyEqual (value, 0.0f) ? TRANS("On") : TRANS("Off")); } + String getText (float value, int) const override { return (! approximatelyEqual (value, 0.0f) ? TRANS ("On") : TRANS ("Off")); } bool isAutomatable() const override { return true; } bool isDiscrete() const override { return true; } bool isBoolean() const override { return true; } @@ -2121,7 +2121,7 @@ private: handleUpdateNowIfNeeded(); for (int i = ComponentPeer::getNumPeers(); --i >= 0;) - if (auto* p = ComponentPeer::getPeer(i)) + if (auto* p = ComponentPeer::getPeer (i)) p->performAnyPendingRepaintsNow(); } } diff --git a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp index e2927d04dd..6956eeb133 100644 --- a/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioPluginInstance.cpp @@ -219,7 +219,7 @@ AudioPluginInstance::Parameter::Parameter() String AudioPluginInstance::Parameter::getText (float value, int maximumStringLength) const { if (isBoolean()) - return value < 0.5f ? TRANS("Off") : TRANS("On"); + return value < 0.5f ? TRANS ("Off") : TRANS ("On"); return String (value).substring (0, maximumStringLength); } diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp index a1a5340355..078c9387fb 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.cpp @@ -434,7 +434,7 @@ void AudioProcessor::validateParameter (AudioProcessorParameter* param) /* If you're building this plugin as an AudioUnit, and you intend to use the plugin in Logic Pro or GarageBand, it's a good idea to set version hints on all of your parameters so that you can add parameters safely in future versions of the plugin. - See the documentation for AudioProcessorParameter(int) for more information. + See the documentation for AudioProcessorParameter (int) for more information. */ #if JucePlugin_Build_AU static std::once_flag flag; @@ -720,8 +720,8 @@ AudioProcessor::BusesLayout AudioProcessor::getNextBestLayoutInList (const Buses auto outChannels = legacyLayouts.getReference (bestConfiguration).outChannels; auto currentState = getBusesLayout(); - auto currentInLayout = (getBusCount (true) > 0 ? currentState.inputBuses .getReference(0) : AudioChannelSet()); - auto currentOutLayout = (getBusCount (false) > 0 ? currentState.outputBuses.getReference(0) : AudioChannelSet()); + auto currentInLayout = (getBusCount (true) > 0 ? currentState.inputBuses .getReference (0) : AudioChannelSet()); + auto currentOutLayout = (getBusCount (false) > 0 ? currentState.outputBuses.getReference (0) : AudioChannelSet()); if (inBus != nullptr) { @@ -1104,7 +1104,7 @@ bool AudioProcessor::Bus::isLayoutSupported (const AudioChannelSet& set, BusesLa bool AudioProcessor::Bus::isNumberOfChannelsSupported (int channels) const { if (channels == 0) - return isLayoutSupported(AudioChannelSet::disabled()); + return isLayoutSupported (AudioChannelSet::disabled()); auto set = supportedLayoutWithChannels (channels); return (! set.isDisabled()) && isLayoutSupported (set); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h index b6b6054678..62dda07de4 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorGraph.h @@ -151,7 +151,7 @@ public: /** @internal - Returns true if setBypassed(true) was called on this node. + Returns true if setBypassed (true) was called on this node. This behaviour is different from isBypassed(), which may additionally return true if the node has a bypass parameter that is not set to 0. */ diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h index 29d5d64df7..bb5615de5d 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorParameter.h @@ -276,7 +276,7 @@ public: virtual StringArray getAllValueStrings() const; //============================================================================== - /** @see AudioProcessorParameter(int) */ + /** @see AudioProcessorParameter (int) */ int getVersionHint() const { return version; } //============================================================================== diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp index 9775d299bd..7b0e62e484 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp @@ -420,7 +420,7 @@ struct PluginTreeUtils { for (int i = tree.subFolders.size(); --i >= 0;) { - auto& sub = *tree.subFolders.getUnchecked(i); + auto& sub = *tree.subFolders.getUnchecked (i); optimiseFolders (sub, concatenateName || (tree.subFolders.size() > 1)); if (sub.plugins.isEmpty()) diff --git a/modules/juce_audio_processors/utilities/ARA/juce_ARAModelObjects.h b/modules/juce_audio_processors/utilities/ARA/juce_ARAModelObjects.h index 2f3096f2f8..3576ce62aa 100644 --- a/modules/juce_audio_processors/utilities/ARA/juce_ARAModelObjects.h +++ b/modules/juce_audio_processors/utilities/ARA/juce_ARAModelObjects.h @@ -658,7 +658,7 @@ public: ARAObject* getChild (size_t index) override; - ARAObject* getParent () override { return getDocument(); } + ARAObject* getParent() override { return getDocument(); } void visit (ARAObjectVisitor& visitor) override { visitor.visitRegionSequence (*this); } diff --git a/modules/juce_audio_processors/utilities/ARA/juce_ARA_utils.cpp b/modules/juce_audio_processors/utilities/ARA/juce_ARA_utils.cpp index 9109d198b8..5e3db3cece 100644 --- a/modules/juce_audio_processors/utilities/ARA/juce_ARA_utils.cpp +++ b/modules/juce_audio_processors/utilities/ARA/juce_ARA_utils.cpp @@ -52,5 +52,5 @@ JUCE_API void JUCE_CALLTYPE handleARAAssertion (const char* file, const int line #include "juce_ARAPlugInInstanceRoles.cpp" #include "juce_AudioProcessor_ARAExtensions.cpp" -ARA_SETUP_DEBUG_MESSAGE_PREFIX(JucePlugin_Name); +ARA_SETUP_DEBUG_MESSAGE_PREFIX (JucePlugin_Name); #endif diff --git a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp index 4791112189..58efd3f059 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp +++ b/modules/juce_audio_processors/utilities/juce_AudioParameterBool.cpp @@ -35,7 +35,7 @@ AudioParameterBool::AudioParameterBool (const ParameterID& idToUse, valueDefault (def), stringFromBoolFunction (attributes.getStringFromValueFunction() != nullptr ? attributes.getStringFromValueFunction() - : [] (bool v, int) { return v ? TRANS("On") : TRANS("Off"); }), + : [] (bool v, int) { return v ? TRANS ("On") : TRANS ("Off"); }), boolFromStringFunction (attributes.getValueFromStringFunction() != nullptr ? attributes.getValueFromStringFunction() : [] (const String& text) diff --git a/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h b/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h index c5a622d269..9647dacc78 100644 --- a/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h +++ b/modules/juce_audio_processors/utilities/juce_AudioProcessorParameterWithID.h @@ -44,7 +44,7 @@ public: @param versionHint Influences parameter ordering in Audio Unit plugins. Used to provide backwards compatibility of Audio Unit plugins in Logic and GarageBand. - @see AudioProcessorParameter(int) + @see AudioProcessorParameter (int) */ template > ParameterID (StringLike&& identifier, int versionHint = 0) @@ -53,7 +53,7 @@ public: /** @see AudioProcessorParameterWithID::paramID */ auto getParamID() const { return paramID; } - /** @see AudioProcessorParameter(int) */ + /** @see AudioProcessorParameter (int) */ auto getVersionHint() const { return version; } private: diff --git a/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.cpp b/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.cpp index 650ad87d76..19f6575088 100644 --- a/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.cpp +++ b/modules/juce_audio_utils/audio_cd/juce_AudioCDReader.cpp @@ -49,7 +49,7 @@ int AudioCDReader::getCDDBId() const int numTracks = getNumTracks(); for (int i = 0; i < numTracks; ++i) - for (int offset = (trackStartSamples.getUnchecked(i) + 88200) / 44100; offset > 0; offset /= 10) + for (int offset = (trackStartSamples.getUnchecked (i) + 88200) / 44100; offset > 0; offset /= 10) checksum += offset % 10; const int length = (trackStartSamples.getLast() - trackStartSamples.getFirst()) / 44100; diff --git a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp index a9cd7df0fe..4f499d8d97 100644 --- a/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioDeviceSelectorComponent.cpp @@ -1000,7 +1000,7 @@ AudioDeviceSelectorComponent::AudioDeviceSelectorComponent (AudioDeviceManager& deviceTypeDropDown = std::make_unique(); for (int i = 0; i < types.size(); ++i) - deviceTypeDropDown->addItem (types.getUnchecked(i)->getTypeName(), i + 1); + deviceTypeDropDown->addItem (types.getUnchecked (i)->getTypeName(), i + 1); addAndMakeVisible (deviceTypeDropDown.get()); deviceTypeDropDown->onChange = [this] { updateDeviceType(); }; diff --git a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp index 31b13de0f9..dac466610d 100644 --- a/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioThumbnail.cpp @@ -672,7 +672,7 @@ bool AudioThumbnail::loadFrom (InputStream& rawInput) for (int i = 0; i < numThumbnailSamples; ++i) for (int chan = 0; chan < numChannels; ++chan) - channels.getUnchecked(chan)->getData(i)->read (input); + channels.getUnchecked (chan)->getData (i)->read (input); return true; } @@ -681,7 +681,7 @@ void AudioThumbnail::saveTo (OutputStream& output) const { const ScopedLock sl (lock); - const int numThumbnailSamples = channels.size() == 0 ? 0 : channels.getUnchecked(0)->getSize(); + const int numThumbnailSamples = channels.size() == 0 ? 0 : channels.getUnchecked (0)->getSize(); output.write ("jatm", 4); output.writeInt (samplesPerThumbSample); @@ -695,7 +695,7 @@ void AudioThumbnail::saveTo (OutputStream& output) const for (int i = 0; i < numThumbnailSamples; ++i) for (int chan = 0; chan < numChannels; ++chan) - channels.getUnchecked(chan)->getData(i)->write (output); + channels.getUnchecked (chan)->getData (i)->write (output); } //============================================================================== diff --git a/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp b/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp index 59800c31c9..6bd65480de 100644 --- a/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioThumbnailCache.cpp @@ -74,8 +74,8 @@ AudioThumbnailCache::~AudioThumbnailCache() AudioThumbnailCache::ThumbnailCacheEntry* AudioThumbnailCache::findThumbFor (const int64 hash) const { for (int i = thumbs.size(); --i >= 0;) - if (thumbs.getUnchecked(i)->hash == hash) - return thumbs.getUnchecked(i); + if (thumbs.getUnchecked (i)->hash == hash) + return thumbs.getUnchecked (i); return nullptr; } @@ -87,7 +87,7 @@ int AudioThumbnailCache::findOldestThumb() const for (int i = thumbs.size(); --i >= 0;) { - const ThumbnailCacheEntry* const te = thumbs.getUnchecked(i); + const ThumbnailCacheEntry* const te = thumbs.getUnchecked (i); if (te->lastUsed < oldestTime) { @@ -150,7 +150,7 @@ void AudioThumbnailCache::removeThumb (const int64 hashCode) const ScopedLock sl (lock); for (int i = thumbs.size(); --i >= 0;) - if (thumbs.getUnchecked(i)->hash == hashCode) + if (thumbs.getUnchecked (i)->hash == hashCode) thumbs.remove (i); } @@ -182,7 +182,7 @@ void AudioThumbnailCache::writeToStream (OutputStream& out) out.writeInt (thumbs.size()); for (int i = 0; i < thumbs.size(); ++i) - thumbs.getUnchecked(i)->write (out); + thumbs.getUnchecked (i)->write (out); } void AudioThumbnailCache::saveNewlyFinishedThumbnail (const AudioThumbnailBase&, int64) diff --git a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp index 765c7a86c8..2ae9d92f1c 100644 --- a/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_AudioVisualiserComponent.cpp @@ -124,7 +124,7 @@ void AudioVisualiserComponent::pushBuffer (const float* const* d, int numChannel numChannels = jmin (numChannels, channels.size()); for (int i = 0; i < numChannels; ++i) - channels.getUnchecked(i)->pushSamples (d[i], num); + channels.getUnchecked (i)->pushSamples (d[i], num); } void AudioVisualiserComponent::pushBuffer (const AudioBuffer& buffer) @@ -139,7 +139,7 @@ void AudioVisualiserComponent::pushBuffer (const AudioSourceChannelInfo& buffer) auto numChannels = jmin (buffer.buffer->getNumChannels(), channels.size()); for (int i = 0; i < numChannels; ++i) - channels.getUnchecked(i)->pushSamples (buffer.buffer->getReadPointer (i, buffer.startSample), + channels.getUnchecked (i)->pushSamples (buffer.buffer->getReadPointer (i, buffer.startSample), buffer.numSamples); } @@ -148,7 +148,7 @@ void AudioVisualiserComponent::pushSample (const float* d, int numChannels) numChannels = jmin (numChannels, channels.size()); for (int i = 0; i < numChannels; ++i) - channels.getUnchecked(i)->pushSample (d[i]); + channels.getUnchecked (i)->pushSample (d[i]); } void AudioVisualiserComponent::setSamplesPerBlock (int newSamplesPerPixel) noexcept diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp index 7029445979..e86b032fae 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp @@ -259,7 +259,7 @@ bool MidiKeyboardComponent::keyStateChanged (bool /*isKeyDown*/) { auto note = 12 * keyMappingOctave + keyPressNotes.getUnchecked (i); - if (keyPresses.getReference(i).isCurrentlyDown()) + if (keyPresses.getReference (i).isCurrentlyDown()) { if (! keysPressed[note]) { diff --git a/modules/juce_audio_utils/native/juce_AudioCDReader_mac.mm b/modules/juce_audio_utils/native/juce_AudioCDReader_mac.mm index 9eb0d6e061..65c4684768 100644 --- a/modules/juce_audio_utils/native/juce_AudioCDReader_mac.mm +++ b/modules/juce_audio_utils/native/juce_AudioCDReader_mac.mm @@ -90,7 +90,7 @@ namespace CDReaderHelpers volumes.findChildFiles (cds, File::findDirectories, false); for (int i = cds.size(); --i >= 0;) - if (! cds.getReference(i).getChildFile (".TOC.plist").exists()) + if (! cds.getReference (i).getChildFile (".TOC.plist").exists()) cds.remove (i); } @@ -122,7 +122,7 @@ StringArray AudioCDReader::getAvailableCDNames() StringArray names; for (int i = 0; i < cds.size(); ++i) - names.add (cds.getReference(i).getFileName()); + names.add (cds.getReference (i).getFileName()); return names; } diff --git a/modules/juce_core/containers/juce_ArrayBase.cpp b/modules/juce_core/containers/juce_ArrayBase.cpp index 9d2657c391..b52f1060a9 100644 --- a/modules/juce_core/containers/juce_ArrayBase.cpp +++ b/modules/juce_core/containers/juce_ArrayBase.cpp @@ -104,7 +104,7 @@ class ArrayBaseTests : public UnitTest using CopyableType = ArrayBaseTestsHelpers::TriviallyCopyableType; using NoncopyableType = ArrayBaseTestsHelpers::NonTriviallyCopyableType; - #if ! (defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__)) + #if ! (defined (__GNUC__) && __GNUC__ < 5 && ! defined (__clang__)) static_assert (std::is_trivially_copyable_v, "Test TriviallyCopyableType is not trivially copyable"); static_assert (! std::is_trivially_copyable_v, diff --git a/modules/juce_core/containers/juce_ArrayBase.h b/modules/juce_core/containers/juce_ArrayBase.h index b4acf73793..ecf4fa3f2f 100644 --- a/modules/juce_core/containers/juce_ArrayBase.h +++ b/modules/juce_core/containers/juce_ArrayBase.h @@ -385,7 +385,7 @@ public: private: //============================================================================== - #if defined(__GNUC__) && __GNUC__ < 5 && ! defined(__clang__) + #if defined (__GNUC__) && __GNUC__ < 5 && ! defined (__clang__) static constexpr auto isTriviallyCopyable = std::is_scalar_v; #else static constexpr auto isTriviallyCopyable = std::is_trivially_copyable_v; diff --git a/modules/juce_core/containers/juce_HashMap.h b/modules/juce_core/containers/juce_HashMap.h index 53414156a8..7cc55e4d1a 100644 --- a/modules/juce_core/containers/juce_HashMap.h +++ b/modules/juce_core/containers/juce_HashMap.h @@ -142,7 +142,7 @@ public: for (auto i = hashSlots.size(); --i >= 0;) { - auto* h = hashSlots.getUnchecked(i); + auto* h = hashSlots.getUnchecked (i); while (h != nullptr) { @@ -217,7 +217,7 @@ public: const ScopedLockType sl (getLock()); for (auto i = getNumSlots(); --i >= 0;) - for (auto* entry = hashSlots.getUnchecked(i); entry != nullptr; entry = entry->nextEntry) + for (auto* entry = hashSlots.getUnchecked (i); entry != nullptr; entry = entry->nextEntry) if (entry->value == valueToLookFor) return true; @@ -269,7 +269,7 @@ public: for (auto i = getNumSlots(); --i >= 0;) { - auto* entry = hashSlots.getUnchecked(i); + auto* entry = hashSlots.getUnchecked (i); HashEntry* previous = nullptr; while (entry != nullptr) @@ -311,7 +311,7 @@ public: { HashEntry* nextEntry = nullptr; - for (auto* entry = hashSlots.getUnchecked(i); entry != nullptr; entry = nextEntry) + for (auto* entry = hashSlots.getUnchecked (i); entry != nullptr; entry = nextEntry) { auto hashIndex = generateHashFor (entry->key, newNumberOfSlots); diff --git a/modules/juce_core/containers/juce_ListenerList.h b/modules/juce_core/containers/juce_ListenerList.h index 37ed43153e..2908f1c3da 100644 --- a/modules/juce_core/containers/juce_ListenerList.h +++ b/modules/juce_core/containers/juce_ListenerList.h @@ -260,18 +260,18 @@ public: //============================================================================== #ifndef DOXYGEN - void call (void (ListenerClass::*callbackFunction) ()) + void call (void (ListenerClass::*callbackFunction)()) { call ([=] (ListenerClass& l) { (l.*callbackFunction)(); }); } - void callExcluding (ListenerClass* listenerToExclude, void (ListenerClass::*callbackFunction) ()) + void callExcluding (ListenerClass* listenerToExclude, void (ListenerClass::*callbackFunction)()) { callExcluding (listenerToExclude, [=] (ListenerClass& l) { (l.*callbackFunction)(); }); } template - void callChecked (const BailOutCheckerType& bailOutChecker, void (ListenerClass::*callbackFunction) ()) + void callChecked (const BailOutCheckerType& bailOutChecker, void (ListenerClass::*callbackFunction)()) { callChecked (bailOutChecker, [=] (ListenerClass& l) { (l.*callbackFunction)(); }); } @@ -279,7 +279,7 @@ public: template void callCheckedExcluding (ListenerClass* listenerToExclude, const BailOutCheckerType& bailOutChecker, - void (ListenerClass::*callbackFunction) ()) + void (ListenerClass::*callbackFunction)()) { callCheckedExcluding (listenerToExclude, bailOutChecker, [=] (ListenerClass& l) { (l.*callbackFunction)(); }); } diff --git a/modules/juce_core/containers/juce_NamedValueSet.cpp b/modules/juce_core/containers/juce_NamedValueSet.cpp index 079a3c078a..1058e2c99d 100644 --- a/modules/juce_core/containers/juce_NamedValueSet.cpp +++ b/modules/juce_core/containers/juce_NamedValueSet.cpp @@ -96,9 +96,9 @@ bool NamedValueSet::operator== (const NamedValueSet& other) const noexcept for (int i = 0; i < num; ++i) { // optimise for the case where the keys are in the same order - if (values.getReference(i).name == other.values.getReference(i).name) + if (values.getReference (i).name == other.values.getReference (i).name) { - if (values.getReference(i).value != other.values.getReference(i).value) + if (values.getReference (i).value != other.values.getReference (i).value) return false; } else @@ -106,8 +106,8 @@ bool NamedValueSet::operator== (const NamedValueSet& other) const noexcept // if we encounter keys that are in a different order, search remaining items by brute force.. for (int j = i; j < num; ++j) { - if (auto* otherVal = other.getVarPointer (values.getReference(j).name)) - if (values.getReference(j).value == *otherVal) + if (auto* otherVal = other.getVarPointer (values.getReference (j).name)) + if (values.getReference (j).value == *otherVal) continue; return false; @@ -205,7 +205,7 @@ int NamedValueSet::indexOf (const Identifier& name) const noexcept auto numValues = values.size(); for (int i = 0; i < numValues; ++i) - if (values.getReference(i).name == name) + if (values.getReference (i).name == name) return i; return -1; @@ -217,7 +217,7 @@ bool NamedValueSet::remove (const Identifier& name) for (int i = 0; i < numValues; ++i) { - if (values.getReference(i).name == name) + if (values.getReference (i).name == name) { values.remove (i); return true; diff --git a/modules/juce_core/containers/juce_SparseSet.h b/modules/juce_core/containers/juce_SparseSet.h index 0dcff925e8..6343421d12 100644 --- a/modules/juce_core/containers/juce_SparseSet.h +++ b/modules/juce_core/containers/juce_SparseSet.h @@ -161,7 +161,7 @@ public: { for (int i = ranges.size(); --i >= 0;) { - auto& r = ranges.getReference(i); + auto& r = ranges.getReference (i); if (r.getEnd() <= rangeToRemove.getStart()) break; diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index 43e226e38e..e91204982a 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -1055,7 +1055,7 @@ public: expect (! File().existsAsFile()); expect (! File().isDirectory()); #if ! JUCE_WINDOWS - expect (File("/").isDirectory()); + expect (File ("/").isDirectory()); #endif expect (home.isDirectory()); expect (home.exists()); diff --git a/modules/juce_core/javascript/juce_JSON.cpp b/modules/juce_core/javascript/juce_JSON.cpp index c7d9663368..f985d0a044 100644 --- a/modules/juce_core/javascript/juce_JSON.cpp +++ b/modules/juce_core/javascript/juce_JSON.cpp @@ -431,7 +431,7 @@ struct JSONFormatter if (! allOnOneLine) writeSpaces (out, indentLevel + indentSize); - write (out, array.getReference(i), indentLevel + indentSize, allOnOneLine, maximumDecimalPlaces); + write (out, array.getReference (i), indentLevel + indentSize, allOnOneLine, maximumDecimalPlaces); if (i < array.size() - 1) { diff --git a/modules/juce_core/javascript/juce_JSONSerialisation.h b/modules/juce_core/javascript/juce_JSONSerialisation.h index 0b94956ea3..4f6421f021 100644 --- a/modules/juce_core/javascript/juce_JSONSerialisation.h +++ b/modules/juce_core/javascript/juce_JSONSerialisation.h @@ -144,7 +144,7 @@ private: { push ((double) t); } - else if (auto converted = convert(t)) + else if (auto converted = convert (t)) { push (*converted); } diff --git a/modules/juce_core/javascript/juce_Javascript.cpp b/modules/juce_core/javascript/juce_Javascript.cpp index 79a60f2ff6..74031e679d 100644 --- a/modules/juce_core/javascript/juce_Javascript.cpp +++ b/modules/juce_core/javascript/juce_Javascript.cpp @@ -288,7 +288,7 @@ struct JavascriptEngine::RootObject : public DynamicObject ResultCode perform (const Scope& s, var* returnedValue) const override { - return (condition->getResult(s) ? trueBranch : falseBranch)->perform (s, returnedValue); + return (condition->getResult (s) ? trueBranch : falseBranch)->perform (s, returnedValue); } ExpPtr condition; @@ -793,7 +793,7 @@ struct JavascriptEngine::RootObject : public DynamicObject DynamicObject::Ptr newObject (new DynamicObject()); for (int i = 0; i < names.size(); ++i) - newObject->setProperty (names.getUnchecked(i), initialisers.getUnchecked(i)->getResult (s)); + newObject->setProperty (names.getUnchecked (i), initialisers.getUnchecked (i)->getResult (s)); return newObject.get(); } @@ -811,7 +811,7 @@ struct JavascriptEngine::RootObject : public DynamicObject Array a; for (int i = 0; i < values.size(); ++i) - a.add (values.getUnchecked(i)->getResult (s)); + a.add (values.getUnchecked (i)->getResult (s)); // std::move() needed here for older compilers JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wredundant-move") @@ -848,7 +848,7 @@ struct JavascriptEngine::RootObject : public DynamicObject functionRoot->setProperty (thisIdent, args.thisObject); for (int i = 0; i < parameters.size(); ++i) - functionRoot->setProperty (parameters.getReference(i), + functionRoot->setProperty (parameters.getReference (i), i < args.numArguments ? args.arguments[i] : var::undefined()); var result; @@ -1641,7 +1641,7 @@ struct JavascriptEngine::RootObject : public DynamicObject auto target = get (a, 0); for (int i = (a.numArguments > 1 ? getInt (a, 1) : 0); i < array->size(); ++i) - if (array->getReference(i) == target) + if (array->getReference (i) == target) return i; } @@ -1780,7 +1780,7 @@ struct JavascriptEngine::RootObject : public DynamicObject { auto s = getString (a, 0).trim(); - return s[0] == '0' ? (s[1] == 'x' ? s.substring(2).getHexValue64() : getOctalValue (s)) + return s[0] == '0' ? (s[1] == 'x' ? s.substring (2).getHexValue64() : getOctalValue (s)) : s.getLargeIntValue(); } }; diff --git a/modules/juce_core/maths/juce_BigInteger.cpp b/modules/juce_core/maths/juce_BigInteger.cpp index 597755e99a..941823d430 100644 --- a/modules/juce_core/maths/juce_BigInteger.cpp +++ b/modules/juce_core/maths/juce_BigInteger.cpp @@ -1005,7 +1005,7 @@ void BigInteger::montgomeryMultiplication (const BigInteger& other, const BigInt void BigInteger::extendedEuclidean (const BigInteger& a, const BigInteger& b, BigInteger& x, BigInteger& y) { - BigInteger p(a), q(b), gcd(1); + BigInteger p (a), q (b), gcd (1); Array tempValues; while (! q.isZero()) @@ -1321,12 +1321,12 @@ public: Random r = getRandom(); expect (BigInteger().isZero()); - expect (BigInteger(1).isOne()); + expect (BigInteger (1).isOne()); for (int j = 10000; --j >= 0;) { - BigInteger b1 (getBigRandom(r)), - b2 (getBigRandom(r)); + BigInteger b1 (getBigRandom (r)), + b2 (getBigRandom (r)); BigInteger b3 = b1 + b2; expect (b3 > b1 && b3 > b2); diff --git a/modules/juce_core/maths/juce_Expression.cpp b/modules/juce_core/maths/juce_Expression.cpp index 49542942d7..fefd5dd915 100644 --- a/modules/juce_core/maths/juce_Expression.cpp +++ b/modules/juce_core/maths/juce_Expression.cpp @@ -69,7 +69,7 @@ public: virtual void visitAllSymbols (SymbolVisitor& visitor, const Scope& scope, int recursionDepth) { for (int i = getNumInputs(); --i >= 0;) - getInput(i)->visitAllSymbols (visitor, scope, recursionDepth); + getInput (i)->visitAllSymbols (visitor, scope, recursionDepth); } private: @@ -238,7 +238,7 @@ struct Expression::Helpers Type getType() const noexcept { return functionType; } Term* clone() const { return new Function (functionName, parameters); } int getNumInputs() const { return parameters.size(); } - Term* getInput (int i) const { return parameters.getReference(i).term.get(); } + Term* getInput (int i) const { return parameters.getReference (i).term.get(); } String getName() const { return functionName; } TermPtr resolve (const Scope& scope, int recursionDepth) @@ -252,7 +252,7 @@ struct Expression::Helpers HeapBlock params (numParams); for (int i = 0; i < numParams; ++i) - params[i] = parameters.getReference(i).term->resolve (scope, recursionDepth + 1)->toDouble(); + params[i] = parameters.getReference (i).term->resolve (scope, recursionDepth + 1)->toDouble(); result = scope.evaluateFunction (functionName, params, numParams); } @@ -267,7 +267,7 @@ struct Expression::Helpers int getInputIndexFor (const Term* possibleInput) const { for (int i = 0; i < parameters.size(); ++i) - if (parameters.getReference(i).term == possibleInput) + if (parameters.getReference (i).term == possibleInput) return i; return -1; @@ -282,7 +282,7 @@ struct Expression::Helpers for (int i = 0; i < parameters.size(); ++i) { - s << parameters.getReference(i).term->toString(); + s << parameters.getReference (i).term->toString(); if (i < parameters.size() - 1) s << ", "; diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index 30365240e1..be3c90c68c 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -149,7 +149,7 @@ struct MathConstants /** A predefined value for Euler's number */ static constexpr FloatType euler = static_cast (2.71828182845904523536L); - /** A predefined value for sqrt(2) */ + /** A predefined value for sqrt (2) */ static constexpr FloatType sqrt2 = static_cast (1.4142135623730950488L); }; @@ -276,8 +276,8 @@ static Tolerance relativeTolerance (Type tolerance) differences that are subnormal are always considered equal. It is highly recommend this value is reviewed depending on the calculation being carried out. In general specifying an absolute value is useful when considering values close to zero. For example you might - expect sin(pi) to return 0, but what it actually returns is close to the error of the value pi. - Therefore, in this example it might be better to set the absolute tolerance to sin(pi). + expect sin (pi) to return 0, but what it actually returns is close to the error of the value pi. + Therefore, in this example it might be better to set the absolute tolerance to sin (pi). The default relative tolerance is equal to the machine epsilon which is the difference between 1.0 and the next floating-point value that can be represented by Type. In most cases this value diff --git a/modules/juce_core/maths/juce_MathsFunctions_test.cpp b/modules/juce_core/maths/juce_MathsFunctions_test.cpp index 2dcf427b9c..9b8da67e69 100644 --- a/modules/juce_core/maths/juce_MathsFunctions_test.cpp +++ b/modules/juce_core/maths/juce_MathsFunctions_test.cpp @@ -215,7 +215,7 @@ public: expect (! approximatelyEqual (nan, nan)); - const auto expectNotEqualTo = [&](auto value) + const auto expectNotEqualTo = [&] (auto value) { expect (! approximatelyEqual (value, nan)); expect (! approximatelyEqual (nan, value)); @@ -242,7 +242,7 @@ public: expect (! approximatelyEqual (inf, -inf)); expect (! approximatelyEqual (-inf, inf)); - const auto expectNotEqualTo = [&](auto value) + const auto expectNotEqualTo = [&] (auto value) { expect (! approximatelyEqual (value, inf)); expect (! approximatelyEqual (value, -inf)); @@ -274,11 +274,11 @@ public: (T) 0.0078125 /* 2^-7 */ }; - const auto testTolerance = [&](auto tolerance) + const auto testTolerance = [&] (auto tolerance) { const auto t = Tolerance{}.withAbsolute ((T) tolerance); - const auto testValue= [&](auto value) + const auto testValue= [&] (auto value) { const auto boundary = value + tolerance; diff --git a/modules/juce_core/memory/juce_LeakedObjectDetector.h b/modules/juce_core/memory/juce_LeakedObjectDetector.h index 808b069a19..bc95cffb26 100644 --- a/modules/juce_core/memory/juce_LeakedObjectDetector.h +++ b/modules/juce_core/memory/juce_LeakedObjectDetector.h @@ -113,7 +113,7 @@ private: #if (DOXYGEN || JUCE_CHECK_MEMORY_LEAKS) /** This macro lets you embed a leak-detecting object inside a class. - To use it, simply declare a JUCE_LEAK_DETECTOR(YourClassName) inside a private section + To use it, simply declare a JUCE_LEAK_DETECTOR (YourClassName) inside a private section of the class declaration. E.g. @code diff --git a/modules/juce_core/memory/juce_SharedResourcePointer.h b/modules/juce_core/memory/juce_SharedResourcePointer.h index 2f9a526bf7..98570b9b07 100644 --- a/modules/juce_core/memory/juce_SharedResourcePointer.h +++ b/modules/juce_core/memory/juce_SharedResourcePointer.h @@ -135,7 +135,7 @@ private: static SharedObjectHolder& getSharedObjectHolder() noexcept { - static void* holder [(sizeof (SharedObjectHolder) + sizeof(void*) - 1) / sizeof(void*)] = { nullptr }; + static void* holder [(sizeof (SharedObjectHolder) + sizeof (void*) - 1) / sizeof (void*)] = { nullptr }; return *reinterpret_cast (holder); } diff --git a/modules/juce_core/memory/juce_Singleton.h b/modules/juce_core/memory/juce_Singleton.h index 697b331214..e40fed61af 100644 --- a/modules/juce_core/memory/juce_Singleton.h +++ b/modules/juce_core/memory/juce_Singleton.h @@ -128,10 +128,10 @@ struct SingletonHolder : private MutexType // (inherited so we can use the empt /** Macro to generate the appropriate methods and boilerplate for a singleton class. - To use this, add the line JUCE_DECLARE_SINGLETON(MyClass, doNotRecreateAfterDeletion) + To use this, add the line JUCE_DECLARE_SINGLETON (MyClass, doNotRecreateAfterDeletion) to the class's definition. - Then put a macro JUCE_IMPLEMENT_SINGLETON(MyClass) along with the class's + Then put a macro JUCE_IMPLEMENT_SINGLETON (MyClass) along with the class's implementation code. It's also a very good idea to also add the call clearSingletonInstance() in your class's diff --git a/modules/juce_core/misc/juce_ConsoleApplication.cpp b/modules/juce_core/misc/juce_ConsoleApplication.cpp index 7b6e172a81..89cc06de03 100644 --- a/modules/juce_core/misc/juce_ConsoleApplication.cpp +++ b/modules/juce_core/misc/juce_ConsoleApplication.cpp @@ -201,7 +201,7 @@ String ArgumentList::getValueForOption (StringRef option) const for (int i = 0; i < arguments.size(); ++i) { - auto& arg = arguments.getReference(i); + auto& arg = arguments.getReference (i); if (arg == option) { @@ -227,7 +227,7 @@ String ArgumentList::removeValueForOption (StringRef option) for (int i = 0; i < arguments.size(); ++i) { - auto& arg = arguments.getReference(i); + auto& arg = arguments.getReference (i); if (arg == option) { diff --git a/modules/juce_core/native/juce_AndroidDocument_android.cpp b/modules/juce_core/native/juce_AndroidDocument_android.cpp index d86eb2f0b9..876b3b6fbc 100644 --- a/modules/juce_core/native/juce_AndroidDocument_android.cpp +++ b/modules/juce_core/native/juce_AndroidDocument_android.cpp @@ -161,7 +161,7 @@ struct AndroidDocumentDetail documentId.get()) }; return DocumentsContractIteratorEngine { Columns { GlobalRef { uri }, - GlobalRefImpl { javaString("document_id") } }, + GlobalRefImpl { javaString ("document_id") } }, childrenUri.get() }; } diff --git a/modules/juce_core/native/juce_Files_windows.cpp b/modules/juce_core/native/juce_Files_windows.cpp index 6bc65bf228..40fea86383 100644 --- a/modules/juce_core/native/juce_Files_windows.cpp +++ b/modules/juce_core/native/juce_Files_windows.cpp @@ -777,7 +777,7 @@ String File::getVersion() const VS_FIXEDFILEINFO* vffi; UINT len = 0; - if (VerQueryValue (buffer, (LPTSTR) _T("\\"), (LPVOID*) &vffi, &len)) + if (VerQueryValue (buffer, (LPTSTR) _T ("\\"), (LPVOID*) &vffi, &len)) { result << (int) HIWORD (vffi->dwFileVersionMS) << '.' << (int) LOWORD (vffi->dwFileVersionMS) << '.' diff --git a/modules/juce_core/native/juce_JNIHelpers_android.cpp b/modules/juce_core/native/juce_JNIHelpers_android.cpp index 6f677c575c..79349061a0 100644 --- a/modules/juce_core/native/juce_JNIHelpers_android.cpp +++ b/modules/juce_core/native/juce_JNIHelpers_android.cpp @@ -139,14 +139,14 @@ Array& JNIClassBase::getClasses() static File getCodeCacheDirectory() { int pid = getpid(); - File cmdline("/proc/" + String(pid) + "/cmdline"); + File cmdline ("/proc/" + String (pid) + "/cmdline"); auto bundleId = cmdline.loadFileAsString().trimStart().trimEnd(); if (bundleId.isEmpty()) return {}; - return File("/data/data/" + bundleId + "/code_cache"); + return File ("/data/data/" + bundleId + "/code_cache"); } void JNIClassBase::initialise (JNIEnv* env, jobject context) @@ -279,14 +279,14 @@ void JNIClassBase::initialiseAllClasses (JNIEnv* env, jobject context) { const Array& classes = getClasses(); for (int i = classes.size(); --i >= 0;) - classes.getUnchecked(i)->initialise (env, context); + classes.getUnchecked (i)->initialise (env, context); } void JNIClassBase::releaseAllClasses (JNIEnv* env) { const Array& classes = getClasses(); for (int i = classes.size(); --i >= 0;) - classes.getUnchecked(i)->release (env); + classes.getUnchecked (i)->release (env); } jmethodID JNIClassBase::resolveMethod (JNIEnv* env, const char* methodName, const char* params) diff --git a/modules/juce_core/native/juce_Network_curl.cpp b/modules/juce_core/native/juce_Network_curl.cpp index 1cf9ecf482..0fcf35b092 100644 --- a/modules/juce_core/native/juce_Network_curl.cpp +++ b/modules/juce_core/native/juce_Network_curl.cpp @@ -379,7 +379,7 @@ public: { #else curl_off_t curlLength; - if (symbols->curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &curlLength) == CURLE_OK) + if (symbols->curl_easy_getinfo (curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &curlLength) == CURLE_OK) { #endif contentLength = static_cast (curlLength); diff --git a/modules/juce_core/native/juce_Network_linux.cpp b/modules/juce_core/native/juce_Network_linux.cpp index c71a13e237..1d66db964f 100644 --- a/modules/juce_core/native/juce_Network_linux.cpp +++ b/modules/juce_core/native/juce_Network_linux.cpp @@ -511,9 +511,9 @@ private: else writeHost (header, httpRequestCmd, originalURL, proxyName, proxyPort); - writeValueIfNotPresent (header, userHeaders, "User-Agent:", "JUCE/" JUCE_STRINGIFY(JUCE_MAJOR_VERSION) - "." JUCE_STRINGIFY(JUCE_MINOR_VERSION) - "." JUCE_STRINGIFY(JUCE_BUILDNUMBER)); + writeValueIfNotPresent (header, userHeaders, "User-Agent:", "JUCE/" JUCE_STRINGIFY (JUCE_MAJOR_VERSION) + "." JUCE_STRINGIFY (JUCE_MINOR_VERSION) + "." JUCE_STRINGIFY (JUCE_BUILDNUMBER)); writeValueIfNotPresent (header, userHeaders, "Connection:", "close"); const auto postDataSize = postData.getSize(); diff --git a/modules/juce_core/native/juce_Network_windows.cpp b/modules/juce_core/native/juce_Network_windows.cpp index 621da4acac..1b85067ec5 100644 --- a/modules/juce_core/native/juce_Network_windows.cpp +++ b/modules/juce_core/native/juce_Network_windows.cpp @@ -274,7 +274,7 @@ private: void createConnection (const String& address, WebInputStream::Listener* listener) { - static HINTERNET sessionHandle = InternetOpen (_T("juce"), INTERNET_OPEN_TYPE_PRECONFIG, nullptr, nullptr, 0); + static HINTERNET sessionHandle = InternetOpen (_T ("juce"), INTERNET_OPEN_TYPE_PRECONFIG, nullptr, nullptr, 0); closeConnection(); @@ -388,7 +388,7 @@ private: void openHTTPConnection (URL_COMPONENTS& uc, const String& address, WebInputStream::Listener* listener) { - const TCHAR* mimeTypes[] = { _T("*/*"), nullptr }; + const TCHAR* mimeTypes[] = { _T ("*/*"), nullptr }; DWORD flags = INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_NO_COOKIES | INTERNET_FLAG_NO_AUTO_REDIRECT; diff --git a/modules/juce_core/native/juce_RuntimePermissions_android.cpp b/modules/juce_core/native/juce_RuntimePermissions_android.cpp index 45a30233e7..8b465096ad 100644 --- a/modules/juce_core/native/juce_RuntimePermissions_android.cpp +++ b/modules/juce_core/native/juce_RuntimePermissions_android.cpp @@ -182,13 +182,13 @@ struct PermissionsOverlay : FragmentOverlay auto requestPermissionsMethodID - = env->GetMethodID(AndroidFragment, "requestPermissions", "([Ljava/lang/String;I)V"); + = env->GetMethodID (AndroidFragment, "requestPermissions", "([Ljava/lang/String;I)V"); // this code should only be reached for SDKs >= 23, so this method should be // be available - jassert(requestPermissionsMethodID != nullptr); + jassert (requestPermissionsMethodID != nullptr); - env->CallVoidMethod (getNativeHandle(), requestPermissionsMethodID, jPermissionsArray.get (), 0); + env->CallVoidMethod (getNativeHandle(), requestPermissionsMethodID, jPermissionsArray.get(), 0); } else { diff --git a/modules/juce_core/native/juce_SystemStats_android.cpp b/modules/juce_core/native/juce_SystemStats_android.cpp index 4000613c69..42070a4530 100644 --- a/modules/juce_core/native/juce_SystemStats_android.cpp +++ b/modules/juce_core/native/juce_SystemStats_android.cpp @@ -128,7 +128,7 @@ int SystemStats::getCpuSpeedInMegahertz() for (int i = 0; i < getNumCpus(); ++i) { - int freqKHz = File ("/sys/devices/system/cpu/cpu" + String(i) + "/cpufreq/cpuinfo_max_freq") + int freqKHz = File ("/sys/devices/system/cpu/cpu" + String (i) + "/cpufreq/cpuinfo_max_freq") .loadFileAsString() .getIntValue(); diff --git a/modules/juce_core/native/juce_SystemStats_windows.cpp b/modules/juce_core/native/juce_SystemStats_windows.cpp index 113b2c5734..16f5e83b1c 100644 --- a/modules/juce_core/native/juce_SystemStats_windows.cpp +++ b/modules/juce_core/native/juce_SystemStats_windows.cpp @@ -244,7 +244,7 @@ static DebugFlagsInitialiser debugFlagsInitialiser; #if JUCE_MINGW static uint64 getWindowsVersion() { - auto filename = _T("kernel32.dll"); + auto filename = _T ("kernel32.dll"); DWORD handle = 0; if (auto size = GetFileVersionInfoSize (filename, &handle)) @@ -256,7 +256,7 @@ static DebugFlagsInitialiser debugFlagsInitialiser; VS_FIXEDFILEINFO* info = nullptr; UINT verSize = 0; - if (VerQueryValue (data, (LPCTSTR) _T("\\"), (void**) &info, &verSize)) + if (VerQueryValue (data, (LPCTSTR) _T ("\\"), (void**) &info, &verSize)) if (size > 0 && info != nullptr && info->dwSignature == 0xfeef04bd) return ((uint64) info->dwFileVersionMS << 32) | (uint64) info->dwFileVersionLS; } diff --git a/modules/juce_core/native/juce_Threads_android.cpp b/modules/juce_core/native/juce_Threads_android.cpp index 68967499c1..21bb05f9e1 100644 --- a/modules/juce_core/native/juce_Threads_android.cpp +++ b/modules/juce_core/native/juce_Threads_android.cpp @@ -72,7 +72,7 @@ extern "C" jint JNIEXPORT JNI_OnLoad (JavaVM* vm, void*) auto* env = getEnv(); // register the initialisation function - auto juceJavaClass = env->FindClass("com/rmsl/juce/Java"); + auto juceJavaClass = env->FindClass ("com/rmsl/juce/Java"); if (juceJavaClass != nullptr) { diff --git a/modules/juce_core/native/juce_Threads_mac.mm b/modules/juce_core/native/juce_Threads_mac.mm index 77a7ab9940..82f8a36468 100644 --- a/modules/juce_core/native/juce_Threads_mac.mm +++ b/modules/juce_core/native/juce_Threads_mac.mm @@ -237,7 +237,7 @@ JUCE_API void JUCE_CALLTYPE Process::hide() #if JUCE_MAC [NSApp hide: nil]; #elif JUCE_IOS - [[UIApplication sharedApplication] performSelector: @selector(suspend)]; + [[UIApplication sharedApplication] performSelector: @selector (suspend)]; #endif } } diff --git a/modules/juce_core/native/juce_Threads_windows.cpp b/modules/juce_core/native/juce_Threads_windows.cpp index 590a9976bf..6a319ab127 100644 --- a/modules/juce_core/native/juce_Threads_windows.cpp +++ b/modules/juce_core/native/juce_Threads_windows.cpp @@ -178,7 +178,7 @@ struct SleepEvent SleepEvent() noexcept : handle (CreateEvent (nullptr, FALSE, FALSE, #if JUCE_DEBUG - _T("JUCE Sleep Event"))) + _T ("JUCE Sleep Event"))) #else nullptr)) #endif diff --git a/modules/juce_core/network/juce_Socket.h b/modules/juce_core/network/juce_Socket.h index 6d877fad33..689161718d 100644 --- a/modules/juce_core/network/juce_Socket.h +++ b/modules/juce_core/network/juce_Socket.h @@ -69,7 +69,7 @@ public: @returns true on success; false may indicate that another socket is already bound on the same port - @see bindToPort(int localPortNumber), IPAddress::getAllAddresses + @see bindToPort (int localPortNumber), IPAddress::getAllAddresses */ bool bindToPort (int localPortNumber, const String& localAddress); @@ -238,7 +238,7 @@ public: @returns true on success; false may indicate that another socket is already bound on the same port - @see bindToPort(int localPortNumber), IPAddress::getAllAddresses + @see bindToPort (int localPortNumber), IPAddress::getAllAddresses */ bool bindToPort (int localPortNumber, const String& localAddress); diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index dd10be083e..7acd260b06 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -947,7 +947,7 @@ String URL::removeEscapeChars (const String& s) for (int i = 0; i < utf8.size(); ++i) { - if (utf8.getUnchecked(i) == '%') + if (utf8.getUnchecked (i) == '%') { auto hexDigit1 = CharacterFunctions::getHexDigitValue ((juce_wchar) (uint8) utf8 [i + 1]); auto hexDigit2 = CharacterFunctions::getHexDigitValue ((juce_wchar) (uint8) utf8 [i + 2]); @@ -975,7 +975,7 @@ String URL::addEscapeChars (const String& s, bool isParameter, bool roundBracket for (int i = 0; i < utf8.size(); ++i) { - auto c = utf8.getUnchecked(i); + auto c = utf8.getUnchecked (i); if (! (CharacterFunctions::isLetterOrDigit (c) || legalChars.containsChar ((juce_wchar) c))) @@ -1022,7 +1022,7 @@ std::unique_ptr URL::createInputStream (bool usePostCommand, .withConnectionTimeoutMs (timeOutMs) .withResponseHeaders (responseHeaders) .withStatusCode (statusCode) - .withNumRedirectsToFollow(numRedirectsToFollow) + .withNumRedirectsToFollow (numRedirectsToFollow) .withHttpRequestCmd (httpRequestCmd)); } diff --git a/modules/juce_core/network/juce_WebInputStream.cpp b/modules/juce_core/network/juce_WebInputStream.cpp index 71b58311a5..4a00d62cac 100644 --- a/modules/juce_core/network/juce_WebInputStream.cpp +++ b/modules/juce_core/network/juce_WebInputStream.cpp @@ -33,7 +33,7 @@ WebInputStream::~WebInputStream() } WebInputStream& WebInputStream::withExtraHeaders (const String& extra) { pimpl->withExtraHeaders (extra); return *this; } -WebInputStream& WebInputStream::withCustomRequestCommand (const String& cmd) { pimpl->withCustomRequestCommand(cmd); return *this; } +WebInputStream& WebInputStream::withCustomRequestCommand (const String& cmd) { pimpl->withCustomRequestCommand (cmd); return *this; } WebInputStream& WebInputStream::withConnectionTimeout (int t) { pimpl->withConnectionTimeout (t); return *this; } WebInputStream& WebInputStream::withNumRedirectsToFollow (int num) { pimpl->withNumRedirectsToFollow (num); return *this; } StringPairArray WebInputStream::getRequestHeaders() const { return pimpl->getRequestHeaders(); } diff --git a/modules/juce_core/streams/juce_URLInputSource.cpp b/modules/juce_core/streams/juce_URLInputSource.cpp index d50c4c5481..468b46a1a4 100644 --- a/modules/juce_core/streams/juce_URLInputSource.cpp +++ b/modules/juce_core/streams/juce_URLInputSource.cpp @@ -46,7 +46,7 @@ InputStream* URLInputSource::createInputStreamFor (const String& relatedItemPath { auto sub = u.getSubPath(); auto parent = sub.containsChar (L'/') ? sub.upToLastOccurrenceOf ("/", false, false) - : String (); + : String(); return u.withNewSubPath (parent) .getChildURL (relatedItemPath) diff --git a/modules/juce_core/system/juce_CompilerWarnings.h b/modules/juce_core/system/juce_CompilerWarnings.h index e13af095d6..9c4657b916 100644 --- a/modules/juce_core/system/juce_CompilerWarnings.h +++ b/modules/juce_core/system/juce_CompilerWarnings.h @@ -232,8 +232,8 @@ */ #if JUCE_CLANG && __clang_major__ >= JUCE_SANITIZER_ATTRIBUTE_MINIMUM_CLANG_VERSION #define JUCE_BEGIN_NO_SANITIZE(warnings) \ - _Pragma(JUCE_TO_STRING(clang attribute push(__attribute__((no_sanitize(warnings))), apply_to=function))) - #define JUCE_END_NO_SANITIZE _Pragma(JUCE_TO_STRING(clang attribute pop)) + _Pragma (JUCE_TO_STRING (clang attribute push (__attribute__ ((no_sanitize (warnings))), apply_to=function))) + #define JUCE_END_NO_SANITIZE _Pragma (JUCE_TO_STRING (clang attribute pop)) #else #define JUCE_BEGIN_NO_SANITIZE(warnings) #define JUCE_END_NO_SANITIZE diff --git a/modules/juce_core/system/juce_PlatformDefs.h b/modules/juce_core/system/juce_PlatformDefs.h index 039b5a37b0..61b336b576 100644 --- a/modules/juce_core/system/juce_PlatformDefs.h +++ b/modules/juce_core/system/juce_PlatformDefs.h @@ -87,7 +87,7 @@ namespace juce #if JUCE_CLANG && defined (__has_feature) && ! defined (JUCE_ANALYZER_NORETURN) #if __has_feature (attribute_analyzer_noreturn) - inline void __attribute__((analyzer_noreturn)) juce_assert_noreturn() {} + inline void __attribute__ ((analyzer_noreturn)) juce_assert_noreturn() {} #define JUCE_ANALYZER_NORETURN juce::juce_assert_noreturn(); #endif #endif @@ -283,7 +283,7 @@ namespace juce #if JUCE_MSVC #define forcedinline __forceinline #else - #define forcedinline inline __attribute__((always_inline)) + #define forcedinline inline __attribute__ ((always_inline)) #endif #endif @@ -306,7 +306,7 @@ namespace juce //============================================================================== #if JUCE_GCC || JUCE_CLANG - #define JUCE_PACKED __attribute__((packed)) + #define JUCE_PACKED __attribute__ ((packed)) #elif ! defined (DOXYGEN) #define JUCE_PACKED #endif @@ -315,7 +315,7 @@ namespace juce #if JUCE_GCC || DOXYGEN /** This can be appended to a function declaration to tell gcc to disable associative math optimisations which break some floating point algorithms. */ - #define JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS __attribute__((__optimize__("no-associative-math"))) + #define JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS __attribute__ ((__optimize__ ("no-associative-math"))) #else #define JUCE_NO_ASSOCIATIVE_MATH_OPTIMISATIONS #endif diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index 4851d1abb4..4770a7e753 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -147,7 +147,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC #pragma warning (disable: 1125) // (virtual override warning) #endif #elif defined (JUCE_DLL) || defined (JUCE_DLL_BUILD) - #define JUCE_API __attribute__ ((visibility("default"))) + #define JUCE_API __attribute__ ((visibility ("default"))) #endif //============================================================================== diff --git a/modules/juce_core/system/juce_SystemStats.cpp b/modules/juce_core/system/juce_SystemStats.cpp index 5f9b7526dc..0f004429dc 100644 --- a/modules/juce_core/system/juce_SystemStats.cpp +++ b/modules/juce_core/system/juce_SystemStats.cpp @@ -37,9 +37,9 @@ String SystemStats::getJUCEVersion() static_assert (sizeof (int64) == 8, "Basic sanity test failed: please report!"); static_assert (sizeof (uint64) == 8, "Basic sanity test failed: please report!"); - return "JUCE v" JUCE_STRINGIFY(JUCE_MAJOR_VERSION) - "." JUCE_STRINGIFY(JUCE_MINOR_VERSION) - "." JUCE_STRINGIFY(JUCE_BUILDNUMBER); + return "JUCE v" JUCE_STRINGIFY (JUCE_MAJOR_VERSION) + "." JUCE_STRINGIFY (JUCE_MINOR_VERSION) + "." JUCE_STRINGIFY (JUCE_BUILDNUMBER); } #if JUCE_ANDROID && ! defined (JUCE_DISABLE_JUCE_VERSION_PRINTING) diff --git a/modules/juce_core/text/juce_LocalisedStrings.h b/modules/juce_core/text/juce_LocalisedStrings.h index 61198e65b6..0049008c5f 100644 --- a/modules/juce_core/text/juce_LocalisedStrings.h +++ b/modules/juce_core/text/juce_LocalisedStrings.h @@ -55,10 +55,10 @@ namespace juce (you can use this to add comments). Note that this is a singleton class, so don't create or destroy the object directly. - There's also a TRANS(text) macro defined to make it easy to use the this. + There's also a TRANS (text) macro defined to make it easy to use the this. @code - printSomething (TRANS("hello")); + printSomething (TRANS ("hello")); @endcode This macro is used in the JUCE classes themselves, so your application has a chance to diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index 4675f1ec78..f303c0f764 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -789,7 +789,7 @@ namespace StringHelpers template inline String& operationAddAssign (String& str, const T number) { - char buffer [(sizeof(T) * 8) / 2]; + char buffer [(sizeof (T) * 8) / 2]; auto* end = buffer + numElementsInArray (buffer); auto* start = NumberToStringConverters::numberToString (end, number); @@ -2420,12 +2420,12 @@ public: expect (s.compare (String ("012345678")) == 0); expect (s.compare (String ("012345679")) < 0); expect (s.compare (String ("012345676")) > 0); - expect (String("a").compareNatural ("A") == 0); - expect (String("A").compareNatural ("B") < 0); - expect (String("a").compareNatural ("B") < 0); - expect (String("10").compareNatural ("2") > 0); - expect (String("Abc 10").compareNatural ("aBC 2") > 0); - expect (String("Abc 1").compareNatural ("aBC 2") < 0); + expect (String ("a").compareNatural ("A") == 0); + expect (String ("A").compareNatural ("B") < 0); + expect (String ("a").compareNatural ("B") < 0); + expect (String ("10").compareNatural ("2") > 0); + expect (String ("Abc 10").compareNatural ("aBC 2") > 0); + expect (String ("Abc 1").compareNatural ("aBC 2") < 0); expect (s.substring (2, 3) == String::charToString (s[2])); expect (s.substring (0, 1) == String::charToString (s[0])); expect (s.getLastCharacter() == s [s.length() - 1]); @@ -2707,7 +2707,7 @@ public: expectEquals (s5.upToLastOccurrenceOf (String(), true, false), s5); expectEquals (s5.upToLastOccurrenceOf ("zword", true, false), s5); expectEquals (s5.upToLastOccurrenceOf ("word", true, false), s5.dropLastCharacters (1)); - expectEquals (s5.dropLastCharacters(1).upToLastOccurrenceOf ("word", true, false), s5.dropLastCharacters (1)); + expectEquals (s5.dropLastCharacters (1).upToLastOccurrenceOf ("word", true, false), s5.dropLastCharacters (1)); expectEquals (s5.upToLastOccurrenceOf ("Word", true, true), s5.dropLastCharacters (1)); expectEquals (s5.upToLastOccurrenceOf ("word", false, false), s5.dropLastCharacters (5)); expectEquals (s5.upToLastOccurrenceOf ("Word", false, true), s5.dropLastCharacters (5)); diff --git a/modules/juce_core/text/juce_String.h b/modules/juce_core/text/juce_String.h index f7f72906f0..2eaf18134c 100644 --- a/modules/juce_core/text/juce_String.h +++ b/modules/juce_core/text/juce_String.h @@ -24,7 +24,7 @@ // Annoyingly we can only forward-declare a typedef by forward-declaring the // aliased type #if __has_attribute(objc_bridge) - #define JUCE_CF_BRIDGED_TYPE(T) __attribute__((objc_bridge(T))) + #define JUCE_CF_BRIDGED_TYPE(T) __attribute__ ((objc_bridge (T))) #else #define JUCE_CF_BRIDGED_TYPE(T) #endif diff --git a/modules/juce_core/text/juce_StringArray.cpp b/modules/juce_core/text/juce_StringArray.cpp index e2a445f1e0..2650a6e619 100644 --- a/modules/juce_core/text/juce_StringArray.cpp +++ b/modules/juce_core/text/juce_StringArray.cpp @@ -201,7 +201,7 @@ int StringArray::indexOf (StringRef stringToLookFor, bool ignoreCase, int i) con if (ignoreCase) { for (; i < numElements; ++i) - if (strings.getReference(i).equalsIgnoreCase (stringToLookFor)) + if (strings.getReference (i).equalsIgnoreCase (stringToLookFor)) return i; } else @@ -230,7 +230,7 @@ void StringArray::removeString (StringRef stringToRemove, bool ignoreCase) if (ignoreCase) { for (int i = size(); --i >= 0;) - if (strings.getReference(i).equalsIgnoreCase (stringToRemove)) + if (strings.getReference (i).equalsIgnoreCase (stringToRemove)) strings.remove (i); } else @@ -252,13 +252,13 @@ void StringArray::removeEmptyStrings (bool removeWhitespaceStrings) if (removeWhitespaceStrings) { for (int i = size(); --i >= 0;) - if (! strings.getReference(i).containsNonWhitespaceChars()) + if (! strings.getReference (i).containsNonWhitespaceChars()) strings.remove (i); } else { for (int i = size(); --i >= 0;) - if (strings.getReference(i).isEmpty()) + if (strings.getReference (i).isEmpty()) strings.remove (i); } } @@ -304,7 +304,7 @@ String StringArray::joinIntoString (StringRef separator, int start, int numberTo auto bytesNeeded = (size_t) (last - start - 1) * separatorBytes; for (int i = start; i < last; ++i) - bytesNeeded += strings.getReference(i).getCharPointer().sizeInBytes() - sizeof (String::CharPointerType::CharType); + bytesNeeded += strings.getReference (i).getCharPointer().sizeInBytes() - sizeof (String::CharPointerType::CharType); String result; result.preallocateBytes (bytesNeeded); @@ -412,7 +412,7 @@ void StringArray::removeDuplicates (bool ignoreCase) { for (int i = 0; i < size() - 1; ++i) { - auto s = strings.getReference(i); + auto s = strings.getReference (i); for (int nextIndex = i + 1;;) { @@ -439,7 +439,7 @@ void StringArray::appendNumbersToDuplicates (bool ignoreCase, for (int i = 0; i < size() - 1; ++i) { - auto& s = strings.getReference(i); + auto& s = strings.getReference (i); auto nextIndex = indexOf (s, ignoreCase, i + 1); if (nextIndex >= 0) diff --git a/modules/juce_core/text/juce_StringPool.cpp b/modules/juce_core/text/juce_StringPool.cpp index 2caf18e0ef..2a56c75aba 100644 --- a/modules/juce_core/text/juce_StringPool.cpp +++ b/modules/juce_core/text/juce_StringPool.cpp @@ -149,7 +149,7 @@ void StringPool::garbageCollect() const ScopedLock sl (lock); for (int i = strings.size(); --i >= 0;) - if (strings.getReference(i).getReferenceCount() == 1) + if (strings.getReference (i).getReferenceCount() == 1) strings.remove (i); lastGarbageCollectionTime = Time::getApproximateMillisecondCounter(); diff --git a/modules/juce_core/threads/juce_HighResolutionTimer.cpp b/modules/juce_core/threads/juce_HighResolutionTimer.cpp index cec292233a..62ed5b6598 100644 --- a/modules/juce_core/threads/juce_HighResolutionTimer.cpp +++ b/modules/juce_core/threads/juce_HighResolutionTimer.cpp @@ -153,7 +153,7 @@ public: WaitableEvent timerFiredOnce; WaitableEvent timerFiredTwice; - Timer timer {[&, callbackCount = 0] () mutable + Timer timer {[&, callbackCount = 0]() mutable { switch (++callbackCount) { @@ -181,7 +181,7 @@ public: { WaitableEvent stoppedTimer; - auto timerCallback = [&](Timer& timer) + auto timerCallback = [&] (Timer& timer) { expect (timer.isTimerRunning()); timer.stopTimer(); @@ -200,7 +200,7 @@ public: WaitableEvent timerRestarted; WaitableEvent timerFiredAfterRestart; - Timer timer {[&, callbackCount = 0] () mutable + Timer timer {[&, callbackCount = 0]() mutable { switch (++callbackCount) { @@ -240,7 +240,7 @@ public: WaitableEvent stoppingTimer; std::atomic timerCallbackFinished { false }; - Timer timer {[&, callbackCount = 0] () mutable + Timer timer {[&, callbackCount = 0]() mutable { switch (++callbackCount) { @@ -295,7 +295,7 @@ public: WaitableEvent timerFiredAfterRestart; std::atomic lastCallbackCount {0}; - Timer timer {[&, callbackCount = 0] () mutable + Timer timer {[&, callbackCount = 0]() mutable { switch (++callbackCount) { @@ -336,7 +336,7 @@ public: WaitableEvent timerStopped; WaitableEvent timerFiredAfterRestart; - Timer timer {[&, callbackCount = 0] () mutable + Timer timer {[&, callbackCount = 0]() mutable { switch (++callbackCount) { diff --git a/modules/juce_core/threads/juce_Thread.cpp b/modules/juce_core/threads/juce_Thread.cpp index 7136608803..98e905531d 100644 --- a/modules/juce_core/threads/juce_Thread.cpp +++ b/modules/juce_core/threads/juce_Thread.cpp @@ -366,9 +366,9 @@ public: beginTest ("Misc"); char a1[7]; - expect (numElementsInArray(a1) == 7); + expect (numElementsInArray (a1) == 7); int a2[3]; - expect (numElementsInArray(a2) == 3); + expect (numElementsInArray (a2) == 3); expect (ByteOrder::swap ((uint16) 0x1122) == 0x2211); expect (ByteOrder::swap ((uint32) 0x11223344) == 0x44332211); diff --git a/modules/juce_core/threads/juce_ThreadPool.cpp b/modules/juce_core/threads/juce_ThreadPool.cpp index 3d6a78913f..16081c7510 100644 --- a/modules/juce_core/threads/juce_ThreadPool.cpp +++ b/modules/juce_core/threads/juce_ThreadPool.cpp @@ -277,7 +277,7 @@ bool ThreadPool::removeAllJobs (bool interruptRunningJobs, int timeOutMs, for (int i = jobs.size(); --i >= 0;) { - auto* job = jobs.getUnchecked(i); + auto* job = jobs.getUnchecked (i); if (selectedJobsToRemove == nullptr || selectedJobsToRemove->isJobSuitable (job)) { diff --git a/modules/juce_core/time/juce_RelativeTime.cpp b/modules/juce_core/time/juce_RelativeTime.cpp index bd8c233d86..ed74b88a0e 100644 --- a/modules/juce_core/time/juce_RelativeTime.cpp +++ b/modules/juce_core/time/juce_RelativeTime.cpp @@ -75,13 +75,13 @@ static String translateTimeField (int n, const char* singular, const char* plura return TRANS (n == 1 ? singular : plural).replace (n == 1 ? "1" : "2", String (n)); } -static String describeYears (int n) { return translateTimeField (n, NEEDS_TRANS("1 year"), NEEDS_TRANS("2 years")); } -static String describeMonths (int n) { return translateTimeField (n, NEEDS_TRANS("1 month"), NEEDS_TRANS("2 months")); } -static String describeWeeks (int n) { return translateTimeField (n, NEEDS_TRANS("1 week"), NEEDS_TRANS("2 weeks")); } -static String describeDays (int n) { return translateTimeField (n, NEEDS_TRANS("1 day"), NEEDS_TRANS("2 days")); } -static String describeHours (int n) { return translateTimeField (n, NEEDS_TRANS("1 hr"), NEEDS_TRANS("2 hrs")); } -static String describeMinutes (int n) { return translateTimeField (n, NEEDS_TRANS("1 min"), NEEDS_TRANS("2 mins")); } -static String describeSeconds (int n) { return translateTimeField (n, NEEDS_TRANS("1 sec"), NEEDS_TRANS("2 secs")); } +static String describeYears (int n) { return translateTimeField (n, NEEDS_TRANS ("1 year"), NEEDS_TRANS ("2 years")); } +static String describeMonths (int n) { return translateTimeField (n, NEEDS_TRANS ("1 month"), NEEDS_TRANS ("2 months")); } +static String describeWeeks (int n) { return translateTimeField (n, NEEDS_TRANS ("1 week"), NEEDS_TRANS ("2 weeks")); } +static String describeDays (int n) { return translateTimeField (n, NEEDS_TRANS ("1 day"), NEEDS_TRANS ("2 days")); } +static String describeHours (int n) { return translateTimeField (n, NEEDS_TRANS ("1 hr"), NEEDS_TRANS ("2 hrs")); } +static String describeMinutes (int n) { return translateTimeField (n, NEEDS_TRANS ("1 min"), NEEDS_TRANS ("2 mins")); } +static String describeSeconds (int n) { return translateTimeField (n, NEEDS_TRANS ("1 sec"), NEEDS_TRANS ("2 secs")); } String RelativeTime::getApproximateDescription() const { diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index c5ddd31258..fc85f676ab 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -206,7 +206,7 @@ public: /** Returns the name of one of the elements attributes. E.g. for an element such as \, then - getAttributeName(1) would return "antlers". + getAttributeName (1) would return "antlers". @see getAttributeValue, getStringAttribute */ @@ -215,7 +215,7 @@ public: /** Returns the value of one of the elements attributes. E.g. for an element such as \, then - getAttributeName(1) would return "2". + getAttributeName (1) would return "2". @see getAttributeName, getStringAttribute */ @@ -689,7 +689,7 @@ private: return *this; } - Iterator operator++(int) + Iterator operator++ (int) { auto copy = *this; ++(*this); @@ -790,7 +790,7 @@ private: void reorderChildElements (XmlElement**, int) noexcept; XmlAttributeNode* getAttribute (StringRef) const noexcept; - // Sigh.. L"" or _T("") string literals are problematic in general, and really inappropriate + // Sigh.. L"" or _T ("") string literals are problematic in general, and really inappropriate // for XML tags. Use a UTF-8 encoded literal instead, or if you're really determined to use // UTF-16, cast it to a String and use the other constructor. XmlElement (const wchar_t*) = delete; diff --git a/modules/juce_cryptography/encryption/juce_BlowFish.cpp b/modules/juce_cryptography/encryption/juce_BlowFish.cpp index a47e459854..d3fd9bd7f4 100644 --- a/modules/juce_cryptography/encryption/juce_BlowFish.cpp +++ b/modules/juce_cryptography/encryption/juce_BlowFish.cpp @@ -251,7 +251,7 @@ void BlowFish::encrypt (uint32& data1, uint32& data2) const noexcept for (int i = 0; i < 16; ++i) { l ^= p[i]; - r ^= F(l); + r ^= F (l); std::swap (l, r); } @@ -267,7 +267,7 @@ void BlowFish::decrypt (uint32& data1, uint32& data2) const noexcept for (int i = 17; i > 1; --i) { l ^= p[i]; - r ^= F(l); + r ^= F (l); std::swap (l, r); } @@ -317,7 +317,7 @@ bool BlowFish::apply (void* data, size_t size, void (BlowFish::*op) (uint32&, ui { union AlignedAccessHelper { - int8 byte[sizeof(uint32) * 2]; + int8 byte[sizeof (uint32) * 2]; uint32 data[2]; }; @@ -356,7 +356,7 @@ int BlowFish::unpad (const void* data, size_t size) noexcept return -1; // remove padding according to https://tools.ietf.org/html/rfc2898#section-6.1.1 - auto paddingSize = reinterpret_cast(data)[size - 1u]; + auto paddingSize = reinterpret_cast (data)[size - 1u]; if (paddingSize == 0 || paddingSize > 8 || paddingSize > size) return -1; @@ -382,7 +382,7 @@ public: auto* dst = reinterpret_cast (block.getData()); for (size_t i = 0; i < n; ++i) - dst[i] = static_cast (random.nextInt(255)); + dst[i] = static_cast (random.nextInt (255)); } void expectEqualData (const void* dataA, const void* dataB, size_t size, const String& failureMessage) @@ -437,7 +437,7 @@ public: for (int i = 0; i < 100; ++i) { - const int keySize = (random.nextInt(17) + 1) * static_cast (sizeof (uint32)); + const int keySize = (random.nextInt (17) + 1) * static_cast (sizeof (uint32)); MemoryBlock key (static_cast (keySize)); fillMemoryBlockWithRandomData (key, random); @@ -459,7 +459,7 @@ public: { // Test unaligned data encryption/decryption. This will be flagged up by a check for // undefined behaviour! - auto nudge = static_cast (random.nextInt (sizeof(void*) - 1)); + auto nudge = static_cast (random.nextInt (sizeof (void*) - 1)); auto unalignedData = (void*) (reinterpret_cast (data.getData()) + nudge); size_t newSize = data.getSize() - nudge; diff --git a/modules/juce_cryptography/hashing/juce_MD5.cpp b/modules/juce_cryptography/hashing/juce_MD5.cpp index 117eb07b90..822388a3a2 100644 --- a/modules/juce_cryptography/hashing/juce_MD5.cpp +++ b/modules/juce_cryptography/hashing/juce_MD5.cpp @@ -297,7 +297,7 @@ public: test ("The quick brown fox jumps over the lazy dog", "9e107d9d372bb6826bd81d3542a419d6"); test ("The quick brown fox jumps over the lazy dog.", "e4d909c290d0fb1ca068ffaddf22cbd0"); - expectEquals (MD5 (CharPointer_UTF8(nullptr)).toHexString(), String ("d41d8cd98f00b204e9800998ecf8427e")); + expectEquals (MD5 (CharPointer_UTF8 (nullptr)).toHexString(), String ("d41d8cd98f00b204e9800998ecf8427e")); } }; diff --git a/modules/juce_data_structures/undomanager/juce_UndoManager.cpp b/modules/juce_data_structures/undomanager/juce_UndoManager.cpp index ccd89d8150..06266a61c1 100644 --- a/modules/juce_data_structures/undomanager/juce_UndoManager.cpp +++ b/modules/juce_data_structures/undomanager/juce_UndoManager.cpp @@ -43,7 +43,7 @@ struct UndoManager::ActionSet bool undo() const { for (int i = actions.size(); --i >= 0;) - if (! actions.getUnchecked(i)->undo()) + if (! actions.getUnchecked (i)->undo()) return false; return true; diff --git a/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp b/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp index 22606f7226..d31ac2eb23 100644 --- a/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp +++ b/modules/juce_data_structures/values/juce_ValueTreeSynchroniser.cpp @@ -68,7 +68,7 @@ namespace ValueTreeSynchroniserHelpers stream.writeCompressedInt (path.size()); for (int i = path.size(); --i >= 0;) - stream.writeCompressedInt (path.getUnchecked(i)); + stream.writeCompressedInt (path.getUnchecked (i)); } static ValueTree readSubTreeLocation (MemoryInputStream& input, ValueTree v) diff --git a/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp index 7b2bcbc506..c533b70861 100644 --- a/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp +++ b/modules/juce_dsp/containers/juce_SIMDRegister_test.cpp @@ -262,9 +262,9 @@ public: { #ifdef _MSC_VER - __declspec(align(sizeof (SIMDRegister))) type elements[SIMDRegister::SIMDNumElements]; + __declspec (align (sizeof (SIMDRegister))) type elements[SIMDRegister::SIMDNumElements]; #else - type elements[SIMDRegister::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister)))); + type elements[SIMDRegister::SIMDNumElements] __attribute__ ((aligned (sizeof (SIMDRegister)))); #endif SIMDRegister_test_internal::fillVec (elements, random); SIMDRegister a (SIMDRegister::fromRawArray (elements)); @@ -412,9 +412,9 @@ public: Operation::template inplace (b.intVersion, bitmask); #ifdef _MSC_VER - __declspec(align(sizeof (SIMDRegister))) type elements[SIMDRegister::SIMDNumElements]; + __declspec (align (sizeof (SIMDRegister))) type elements[SIMDRegister::SIMDNumElements]; #else - type elements[SIMDRegister::SIMDNumElements] __attribute__((aligned(sizeof (SIMDRegister)))); + type elements[SIMDRegister::SIMDNumElements] __attribute__ ((aligned (sizeof (SIMDRegister)))); #endif b.floatVersion.copyToRawArray (elements); diff --git a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp index 5bd99b798c..e0280be8c2 100644 --- a/modules/juce_dsp/filter_design/juce_FilterDesign.cpp +++ b/modules/juce_dsp/filter_design/juce_FilterDesign.cpp @@ -469,7 +469,7 @@ ReferenceCountedArray> auto v0 = std::asinh (epss) / (N * halfPi); if (r == 1) - pa.add(-1.0 / (k / omegap * std::sinh (v0 * halfPi))); + pa.add (-1.0 / (k / omegap * std::sinh (v0 * halfPi))); for (int i = 1; i <= L; ++i) { diff --git a/modules/juce_dsp/frequency/juce_FFT.cpp b/modules/juce_dsp/frequency/juce_FFT.cpp index bc38327102..3f0ef5b702 100644 --- a/modules/juce_dsp/frequency/juce_FFT.cpp +++ b/modules/juce_dsp/frequency/juce_FFT.cpp @@ -105,7 +105,7 @@ struct FFTFallback : public FFT::Instance return; } - const SpinLock::ScopedLockType sl(processLock); + const SpinLock::ScopedLockType sl (processLock); jassert (configForward != nullptr); @@ -232,7 +232,7 @@ struct FFTFallback : public FFT::Instance for (int i = fftSize / 2; i < fftSize; ++i) { auto index = fftSize / 2 - (i - fftSize / 2); - twiddleTable[i] = conj(twiddleTable[index]); + twiddleTable[i] = conj (twiddleTable[index]); } } diff --git a/modules/juce_dsp/frequency/juce_FFT_test.cpp b/modules/juce_dsp/frequency/juce_FFT_test.cpp index 4e3e999ee8..0a240e116c 100644 --- a/modules/juce_dsp/frequency/juce_FFT_test.cpp +++ b/modules/juce_dsp/frequency/juce_FFT_test.cpp @@ -63,7 +63,7 @@ struct FFTUnitTest : public UnitTest / static_cast (n)); for (size_t i = 0; i < n; ++i) - out[i] = freqConvolution (in, static_cast(i) * base_freq, n); + out[i] = freqConvolution (in, static_cast (i) * base_freq, n); } static void performReferenceFourier (const float* in, Complex* out, @@ -78,7 +78,7 @@ struct FFTUnitTest : public UnitTest / static_cast (n)); for (size_t i = 0; i < n; ++i) - out[i] = freqConvolution (buffer.getData(), static_cast(i) * base_freq, n); + out[i] = freqConvolution (buffer.getData(), static_cast (i) * base_freq, n); } @@ -167,7 +167,7 @@ struct FFTUnitTest : public UnitTest struct ComplexTest { - static void run(FFTUnitTest& u) + static void run (FFTUnitTest& u) { Random random (378272); diff --git a/modules/juce_dsp/juce_dsp.h b/modules/juce_dsp/juce_dsp.h index 6653b6f15e..21307ba74f 100644 --- a/modules/juce_dsp/juce_dsp.h +++ b/modules/juce_dsp/juce_dsp.h @@ -58,9 +58,9 @@ #include #include -#if defined(_M_X64) || defined(__amd64__) || defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP == 2) +#if defined (_M_X64) || defined (__amd64__) || defined (__SSE2__) || (defined (_M_IX86_FP) && _M_IX86_FP == 2) - #if defined(_M_X64) || defined(__amd64__) + #if defined (_M_X64) || defined (__amd64__) #ifndef __SSE2__ #define __SSE2__ #endif @@ -96,7 +96,7 @@ #ifndef JUCE_VECTOR_CALLTYPE // __vectorcall does not work on 64-bit due to internal compiler error in // release mode VS2017. Re-enable when Microsoft fixes this - #if _MSC_VER && JUCE_USE_SIMD && ! (defined(_M_X64) || defined(__amd64__)) + #if _MSC_VER && JUCE_USE_SIMD && ! (defined (_M_X64) || defined (__amd64__)) #define JUCE_VECTOR_CALLTYPE __vectorcall #else #define JUCE_VECTOR_CALLTYPE @@ -226,7 +226,7 @@ namespace juce #include "native/juce_SIMDNativeOps_fallback.h" // include the correct native file for this build target CPU - #if defined(__i386__) || defined(__amd64__) || defined(_M_X64) || defined(_X86_) || defined(_M_IX86) + #if defined (__i386__) || defined (__amd64__) || defined (_M_X64) || defined (_X86_) || defined (_M_IX86) #ifdef __AVX2__ #include "native/juce_SIMDNativeOps_avx.h" #else diff --git a/modules/juce_dsp/maths/juce_Matrix.cpp b/modules/juce_dsp/maths/juce_Matrix.cpp index 6d5c8acd67..a0b20cb48f 100644 --- a/modules/juce_dsp/maths/juce_Matrix.cpp +++ b/modules/juce_dsp/maths/juce_Matrix.cpp @@ -34,7 +34,7 @@ Matrix Matrix::identity (size_t size) Matrix result (size, size); for (size_t i = 0; i < size; ++i) - result(i, i) = 1; + result (i, i) = 1; return result; } @@ -60,8 +60,8 @@ Matrix Matrix::toeplitz (const Matrix& vector, size_t template Matrix Matrix::hankel (const Matrix& vector, size_t size, size_t offset) { - jassert(vector.isOneColumnVector()); - jassert(vector.rows >= (2 * (size - 1) + 1)); + jassert (vector.isOneColumnVector()); + jassert (vector.rows >= (2 * (size - 1) + 1)); Matrix result (size, size); diff --git a/modules/juce_dsp/maths/juce_Matrix_test.cpp b/modules/juce_dsp/maths/juce_Matrix_test.cpp index 18aaeb0dca..21eae4564a 100644 --- a/modules/juce_dsp/maths/juce_Matrix_test.cpp +++ b/modules/juce_dsp/maths/juce_Matrix_test.cpp @@ -47,7 +47,7 @@ struct LinearAlgebraUnitTest : public UnitTest Matrix mat2 (2, 4, data2); Matrix mat3 (2, 4, data3); - u.expect((mat1 + mat2) == mat3); + u.expect ((mat1 + mat2) == mat3); } }; @@ -64,7 +64,7 @@ struct LinearAlgebraUnitTest : public UnitTest Matrix mat2 (2, 4, data2); Matrix mat3 (2, 4, data3); - u.expect((mat1 - mat2) == mat3); + u.expect ((mat1 - mat2) == mat3); } }; @@ -114,7 +114,7 @@ struct LinearAlgebraUnitTest : public UnitTest Matrix mat2 (4, 2, data2); Matrix mat3 (2, 2, data3); - u.expect((mat1 * mat2) == mat3); + u.expect ((mat1 * mat2) == mat3); } }; diff --git a/modules/juce_dsp/maths/juce_Polynomial.h b/modules/juce_dsp/maths/juce_Polynomial.h index 77487bb5bb..34868ee327 100644 --- a/modules/juce_dsp/maths/juce_Polynomial.h +++ b/modules/juce_dsp/maths/juce_Polynomial.h @@ -94,7 +94,7 @@ public: FloatingType y (0); for (int i = coeffs.size(); --i >= 0;) - y = (x * y) + coeffs.getUnchecked(i); + y = (x * y) + coeffs.getUnchecked (i); return y; } diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp index 4daf7ad355..c335d9127f 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.cpp @@ -28,7 +28,7 @@ namespace juce namespace dsp { DEFINE_AVX_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1 }; - DEFINE_AVX_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast(0x80000000), 0, static_cast(0x80000000), 0, static_cast(0x80000000), 0, static_cast(0x80000000), 0 }; + DEFINE_AVX_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0, static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; DEFINE_AVX_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f }; DEFINE_AVX_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1, -1, -1, -1 }; diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h index 70ac3474f3..c411a4c33d 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_avx.h @@ -34,17 +34,17 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wignored-attributes") #ifdef _MSC_VER #define DECLARE_AVX_SIMD_CONST(type, name) \ - static __declspec(align(32)) const type name[32 / sizeof (type)] + static __declspec (align (32)) const type name[32 / sizeof (type)] #define DEFINE_AVX_SIMD_CONST(type, class_type, name) \ - __declspec(align(32)) const type SIMDNativeOps:: name[32 / sizeof (type)] + __declspec (align (32)) const type SIMDNativeOps:: name[32 / sizeof (type)] #else #define DECLARE_AVX_SIMD_CONST(type, name) \ - static const type name[32 / sizeof (type)] __attribute__((aligned(32))) + static const type name[32 / sizeof (type)] __attribute__ ((aligned (32))) #define DEFINE_AVX_SIMD_CONST(type, class_type, name) \ - const type SIMDNativeOps:: name[32 / sizeof (type)] __attribute__((aligned(32))) + const type SIMDNativeOps:: name[32 / sizeof (type)] __attribute__ ((aligned (32))) #endif diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp index 2cbd565d04..adb991de6e 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.cpp @@ -28,7 +28,7 @@ namespace juce namespace dsp { DEFINE_NEON_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; - DEFINE_NEON_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast(0x80000000), 0, static_cast(0x80000000), 0 }; + DEFINE_NEON_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; DEFINE_NEON_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; #if JUCE_64BIT diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h index 7f3c6660a1..63341530a5 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_neon.h @@ -34,17 +34,17 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wignored-attributes") #ifdef _MSC_VER #define DECLARE_NEON_SIMD_CONST(type, name) \ - static __declspec(align(16)) const type name [16 / sizeof (type)] + static __declspec (align (16)) const type name [16 / sizeof (type)] #define DEFINE_NEON_SIMD_CONST(type, class_type, name) \ - __declspec(align(16)) const type SIMDNativeOps:: name [16 / sizeof (type)] + __declspec (align (16)) const type SIMDNativeOps:: name [16 / sizeof (type)] #else #define DECLARE_NEON_SIMD_CONST(type, name) \ - static const type name [16 / sizeof (type)] __attribute__((aligned(16))) + static const type name [16 / sizeof (type)] __attribute__ ((aligned (16))) #define DEFINE_NEON_SIMD_CONST(type, class_type, name) \ - const type SIMDNativeOps:: name [16 / sizeof (type)] __attribute__((aligned(16))) + const type SIMDNativeOps:: name [16 / sizeof (type)] __attribute__ ((aligned (16))) #endif diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp index 411d4722ba..5e48bd2dda 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.cpp @@ -28,11 +28,11 @@ namespace juce namespace dsp { DEFINE_SSE_SIMD_CONST (int32_t, float, kAllBitsSet) = { -1, -1, -1, -1 }; - DEFINE_SSE_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast(0x80000000), 0, static_cast(0x80000000), 0 }; + DEFINE_SSE_SIMD_CONST (int32_t, float, kEvenHighBit) = { static_cast (0x80000000), 0, static_cast (0x80000000), 0 }; DEFINE_SSE_SIMD_CONST (float, float, kOne) = { 1.0f, 1.0f, 1.0f, 1.0f }; DEFINE_SSE_SIMD_CONST (int64_t, double, kAllBitsSet) = { -1LL, -1LL }; - DEFINE_SSE_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast(0x8000000000000000), 0 }; + DEFINE_SSE_SIMD_CONST (int64_t, double, kEvenHighBit) = { static_cast (0x8000000000000000), 0 }; DEFINE_SSE_SIMD_CONST (double, double, kOne) = { 1.0, 1.0 }; DEFINE_SSE_SIMD_CONST (int8_t, int8_t, kAllBitsSet) = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; diff --git a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h index c9b4e96f51..eb9fefd3b4 100644 --- a/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h +++ b/modules/juce_dsp/native/juce_SIMDNativeOps_sse.h @@ -34,17 +34,17 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wignored-attributes") #ifdef _MSC_VER #define DECLARE_SSE_SIMD_CONST(type, name) \ - static __declspec(align(16)) const type name [16 / sizeof (type)] + static __declspec (align (16)) const type name [16 / sizeof (type)] #define DEFINE_SSE_SIMD_CONST(type, class_type, name) \ - __declspec(align(16)) const type SIMDNativeOps:: name [16 / sizeof (type)] + __declspec (align (16)) const type SIMDNativeOps:: name [16 / sizeof (type)] #else #define DECLARE_SSE_SIMD_CONST(type, name) \ - static const type name [16 / sizeof (type)] __attribute__((aligned(16))) + static const type name [16 / sizeof (type)] __attribute__ ((aligned (16))) #define DEFINE_SSE_SIMD_CONST(type, class_type, name) \ - const type SIMDNativeOps:: name [16 / sizeof (type)] __attribute__((aligned(16))) + const type SIMDNativeOps:: name [16 / sizeof (type)] __attribute__ ((aligned (16))) #endif @@ -105,9 +105,9 @@ struct SIMDNativeOps static forcedinline float JUCE_VECTOR_CALLTYPE sum (__m128 a) noexcept { - #if defined(__SSE4__) + #if defined (__SSE4__) const auto retval = _mm_dp_ps (a, _mm_loadu_ps (kOne), 0xff); - #elif defined(__SSE3__) + #elif defined (__SSE3__) const auto shuffled = _mm_movehdup_ps (a); const auto sums = _mm_add_ps (a, shuffled); const auto retval = _mm_add_ss (sums, _mm_movehl_ps (shuffled, sums)); @@ -175,9 +175,9 @@ struct SIMDNativeOps static forcedinline double JUCE_VECTOR_CALLTYPE sum (__m128d a) noexcept { - #if defined(__SSE4__) + #if defined (__SSE4__) __m128d retval = _mm_dp_pd (a, vconst (kOne), 0xff); - #elif defined(__SSE3__) + #elif defined (__SSE3__) __m128d retval = _mm_hadd_pd (a, a); #else __m128d retval = _mm_add_pd (_mm_shuffle_pd (a, a, 0x01), a); @@ -211,7 +211,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } - #if defined(__SSE4__) + #if defined (__SSE4__) static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epi8 (a, b); } static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epi8 (a, b); } #else @@ -411,7 +411,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_xor (__m128i a, __m128i b) noexcept { return _mm_xor_si128 (a, b); } static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_andnot (__m128i a, __m128i b) noexcept { return _mm_andnot_si128 (a, b); } static forcedinline __m128i JUCE_VECTOR_CALLTYPE bit_not (__m128i a) noexcept { return _mm_andnot_si128 (a, vconst (kAllBitsSet)); } - #if defined(__SSE4__) + #if defined (__SSE4__) static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { return _mm_min_epu16 (a, b); } static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { return _mm_max_epu16 (a, b); } #else @@ -492,19 +492,19 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_mullo_epi32 (a, b); #else __m128i even = _mm_mul_epu32 (a,b); __m128i odd = _mm_mul_epu32 (_mm_srli_si128 (a,4), _mm_srli_si128 (b,4)); - return _mm_unpacklo_epi32 (_mm_shuffle_epi32(even, _MM_SHUFFLE (0,0,2,0)), - _mm_shuffle_epi32(odd, _MM_SHUFFLE (0,0,2,0))); + return _mm_unpacklo_epi32 (_mm_shuffle_epi32 (even, _MM_SHUFFLE (0,0,2,0)), + _mm_shuffle_epi32 (odd, _MM_SHUFFLE (0,0,2,0))); #endif } static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_min_epi32 (a, b); #else __m128i lt = greaterThan (b, a); @@ -514,7 +514,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_max_epi32 (a, b); #else __m128i gt = greaterThan (a, b); @@ -574,19 +574,19 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE mul (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_mullo_epi32 (a, b); #else __m128i even = _mm_mul_epu32 (a,b); __m128i odd = _mm_mul_epu32 (_mm_srli_si128 (a,4), _mm_srli_si128 (b,4)); - return _mm_unpacklo_epi32 (_mm_shuffle_epi32(even, _MM_SHUFFLE (0,0,2,0)), - _mm_shuffle_epi32(odd, _MM_SHUFFLE (0,0,2,0))); + return _mm_unpacklo_epi32 (_mm_shuffle_epi32 (even, _MM_SHUFFLE (0,0,2,0)), + _mm_shuffle_epi32 (odd, _MM_SHUFFLE (0,0,2,0))); #endif } static forcedinline __m128i JUCE_VECTOR_CALLTYPE min (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_min_epi32 (a, b); #else __m128i lt = greaterThan (b, a); @@ -596,7 +596,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE max (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_max_epi32 (a, b); #else __m128i gt = greaterThan (a, b); @@ -644,7 +644,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_cmpeq_epi64 (a, b); #else __m128i bitmask = _mm_cmpeq_epi32 (a, b); @@ -655,7 +655,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_2__) + #if defined (__SSE4_2__) return _mm_cmpgt_epi64 (a, b); #else return SIMDFallbackOps::greaterThan (a, b); @@ -704,7 +704,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE equal (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_1__) + #if defined (__SSE4_1__) return _mm_cmpeq_epi64 (a, b); #else __m128i bitmask = _mm_cmpeq_epi32 (a, b); @@ -715,7 +715,7 @@ struct SIMDNativeOps static forcedinline __m128i JUCE_VECTOR_CALLTYPE greaterThan (__m128i a, __m128i b) noexcept { - #if defined(__SSE4_2__) + #if defined (__SSE4_2__) return _mm_cmpgt_epi64 (ssign (a), ssign (b)); #else return SIMDFallbackOps::greaterThan (a, b); diff --git a/modules/juce_dsp/processors/juce_DelayLine.cpp b/modules/juce_dsp/processors/juce_DelayLine.cpp index a3f020ae75..c9ecc9e9cd 100644 --- a/modules/juce_dsp/processors/juce_DelayLine.cpp +++ b/modules/juce_dsp/processors/juce_DelayLine.cpp @@ -114,7 +114,7 @@ template SampleType DelayLine::popSample (int channel, SampleType delayInSamples, bool updateReadPointer) { if (delayInSamples >= 0) - setDelay(delayInSamples); + setDelay (delayInSamples); auto result = interpolateSample (channel); diff --git a/modules/juce_dsp/processors/juce_IIRFilter.cpp b/modules/juce_dsp/processors/juce_IIRFilter.cpp index 37bed1e8fb..80a1052957 100644 --- a/modules/juce_dsp/processors/juce_IIRFilter.cpp +++ b/modules/juce_dsp/processors/juce_IIRFilter.cpp @@ -498,7 +498,7 @@ void Coefficients::getMagnitudeForFrequencyArray (const double* fre factor *= jw; } - magnitudes[i] = std::abs(numerator / denominator); + magnitudes[i] = std::abs (numerator / denominator); } } diff --git a/modules/juce_dsp/processors/juce_Oversampling.cpp b/modules/juce_dsp/processors/juce_Oversampling.cpp index 8600b18e52..a028fa7698 100644 --- a/modules/juce_dsp/processors/juce_Oversampling.cpp +++ b/modules/juce_dsp/processors/juce_Oversampling.cpp @@ -729,11 +729,11 @@ void Oversampling::processSamplesDown (AudioBlock& outpu auto currentNumSamples = outputBlock.getNumSamples(); for (int n = 0; n < stages.size() - 1; ++n) - currentNumSamples *= stages.getUnchecked(n)->factor; + currentNumSamples *= stages.getUnchecked (n)->factor; for (int n = stages.size() - 1; n > 0; --n) { - auto& stage = *stages.getUnchecked(n); + auto& stage = *stages.getUnchecked (n); auto audioBlock = stages.getUnchecked (n - 1)->getProcessedSamples (currentNumSamples); stage.processSamplesDown (audioBlock); diff --git a/modules/juce_dsp/processors/juce_ProcessorChain.h b/modules/juce_dsp/processors/juce_ProcessorChain.h index 9f821018c2..59492997e8 100644 --- a/modules/juce_dsp/processors/juce_ProcessorChain.h +++ b/modules/juce_dsp/processors/juce_ProcessorChain.h @@ -120,7 +120,7 @@ private: } std::tuple processors; - std::array bypassed { {} }; + std::array bypassed { {} }; }; /** Non-member equivalent of ProcessorChain::get which avoids awkward diff --git a/modules/juce_dsp/processors/juce_StateVariableFilter.h b/modules/juce_dsp/processors/juce_StateVariableFilter.h index 6554b2bc6e..b5a8458ea7 100644 --- a/modules/juce_dsp/processors/juce_StateVariableFilter.h +++ b/modules/juce_dsp/processors/juce_StateVariableFilter.h @@ -224,7 +224,7 @@ namespace StateVariableFilter Note: The bandwidth of the resonance increases with the value of the parameter. To have a standard 12 dB/octave filter, the value must be set - at 1 / sqrt(2). + at 1 / sqrt (2). */ void setCutOffFrequency (double sampleRate, NumericType frequency, NumericType resonance = static_cast (1.0 / MathConstants::sqrt2)) noexcept diff --git a/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h b/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h index 9137f07940..eea4b07ed5 100644 --- a/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h +++ b/modules/juce_dsp/processors/juce_StateVariableTPTFilter.h @@ -80,7 +80,7 @@ public: Note: The bandwidth of the resonance increases with the value of the parameter. To have a standard 12 dB / octave filter, the value must be set - at 1 / sqrt(2). + at 1 / sqrt (2). */ void setResonance (SampleType newResonance); diff --git a/modules/juce_dsp/widgets/juce_Chorus.h b/modules/juce_dsp/widgets/juce_Chorus.h index 013950614a..af4b691b1d 100644 --- a/modules/juce_dsp/widgets/juce_Chorus.h +++ b/modules/juce_dsp/widgets/juce_Chorus.h @@ -103,7 +103,7 @@ public: return; } - auto delayValuesBlock = AudioBlock(bufferDelayTimes).getSubBlock (0, numSamples); + auto delayValuesBlock = AudioBlock (bufferDelayTimes).getSubBlock (0, numSamples); auto contextDelay = ProcessContextReplacing (delayValuesBlock); delayValuesBlock.clear(); diff --git a/modules/juce_dsp/widgets/juce_Phaser.h b/modules/juce_dsp/widgets/juce_Phaser.h index 2a13027437..f8263d3e80 100644 --- a/modules/juce_dsp/widgets/juce_Phaser.h +++ b/modules/juce_dsp/widgets/juce_Phaser.h @@ -114,7 +114,7 @@ public: if (numSamplesDown > 0) { - auto freqBlock = AudioBlock(bufferFrequency).getSubBlock (0, (size_t) numSamplesDown); + auto freqBlock = AudioBlock (bufferFrequency).getSubBlock (0, (size_t) numSamplesDown); auto contextFreq = ProcessContextReplacing (freqBlock); freqBlock.clear(); diff --git a/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp b/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp index d21c98903c..d42d9e024a 100644 --- a/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp +++ b/modules/juce_events/broadcasters/juce_ActionBroadcaster.cpp @@ -86,7 +86,7 @@ void ActionBroadcaster::sendActionMessage (const String& message) const const ScopedLock sl (actionListenerLock); for (int i = actionListeners.size(); --i >= 0;) - (new ActionMessage (this, message, actionListeners.getUnchecked(i)))->post(); + (new ActionMessage (this, message, actionListeners.getUnchecked (i)))->post(); } } // namespace juce diff --git a/modules/juce_events/messages/juce_ApplicationBase.cpp b/modules/juce_events/messages/juce_ApplicationBase.cpp index 7b0eb87252..59d807ea5f 100644 --- a/modules/juce_events/messages/juce_ApplicationBase.cpp +++ b/modules/juce_events/messages/juce_ApplicationBase.cpp @@ -183,7 +183,7 @@ StringArray JUCE_CALLTYPE JUCEApplicationBase::getCommandLineParameterArray() extern void initialiseNSApplication(); #endif -#if (JUCE_LINUX || JUCE_BSD) && JUCE_MODULE_AVAILABLE_juce_gui_extra && (! defined(JUCE_WEB_BROWSER) || JUCE_WEB_BROWSER) +#if (JUCE_LINUX || JUCE_BSD) && JUCE_MODULE_AVAILABLE_juce_gui_extra && (! defined (JUCE_WEB_BROWSER) || JUCE_WEB_BROWSER) extern "C" int juce_gtkWebkitMain (int argc, const char* const* argv); #endif @@ -290,9 +290,9 @@ bool JUCEApplicationBase::initialiseApp() // a redirect or similar. FILE* ignore; - if (_fileno(stdout) < 0) freopen_s (&ignore, "CONOUT$", "w", stdout); - if (_fileno(stderr) < 0) freopen_s (&ignore, "CONOUT$", "w", stderr); - if (_fileno(stdin) < 0) freopen_s (&ignore, "CONIN$", "r", stdin); + if (_fileno (stdout) < 0) freopen_s (&ignore, "CONOUT$", "w", stdout); + if (_fileno (stderr) < 0) freopen_s (&ignore, "CONOUT$", "w", stderr); + if (_fileno (stdin) < 0) freopen_s (&ignore, "CONIN$", "r", stdin); } #endif diff --git a/modules/juce_events/messages/juce_DeletedAtShutdown.cpp b/modules/juce_events/messages/juce_DeletedAtShutdown.cpp index 4eff17df7a..cae91f418b 100644 --- a/modules/juce_events/messages/juce_DeletedAtShutdown.cpp +++ b/modules/juce_events/messages/juce_DeletedAtShutdown.cpp @@ -62,7 +62,7 @@ void DeletedAtShutdown::deleteAll() { JUCE_TRY { - auto* deletee = localCopy.getUnchecked(i); + auto* deletee = localCopy.getUnchecked (i); // double-check that it's not already been deleted during another object's destructor. { diff --git a/modules/juce_events/timers/juce_MultiTimer.cpp b/modules/juce_events/timers/juce_MultiTimer.cpp index 8074bf8df8..48e5c65a2a 100644 --- a/modules/juce_events/timers/juce_MultiTimer.cpp +++ b/modules/juce_events/timers/juce_MultiTimer.cpp @@ -56,7 +56,7 @@ Timer* MultiTimer::getCallback (int timerID) const noexcept { for (int i = timers.size(); --i >= 0;) { - MultiTimerCallback* const t = static_cast (timers.getUnchecked(i)); + MultiTimerCallback* const t = static_cast (timers.getUnchecked (i)); if (t->timerID == timerID) return t; diff --git a/modules/juce_graphics/colour/juce_ColourGradient.cpp b/modules/juce_graphics/colour/juce_ColourGradient.cpp index c5bf134263..72009a60f8 100644 --- a/modules/juce_graphics/colour/juce_ColourGradient.cpp +++ b/modules/juce_graphics/colour/juce_ColourGradient.cpp @@ -125,7 +125,7 @@ int ColourGradient::addColour (const double proportionAlongGradient, Colour colo int i; for (i = 0; i < colours.size(); ++i) - if (colours.getReference(i).position > pos) + if (colours.getReference (i).position > pos) break; colours.insert (i, { pos, colour }); @@ -177,10 +177,10 @@ Colour ColourGradient::getColourAtPosition (double position) const noexcept jassert (approximatelyEqual (colours.getReference (0).position, 0.0)); // the first colour specified has to go at position 0 if (position <= 0 || colours.size() <= 1) - return colours.getReference(0).colour; + return colours.getReference (0).colour; int i = colours.size() - 1; - while (position < colours.getReference(i).position) + while (position < colours.getReference (i).position) --i; auto& p1 = colours.getReference (i); @@ -199,7 +199,7 @@ void ColourGradient::createLookupTable (PixelARGB* const lookupTable, const int JUCE_COLOURGRADIENT_CHECK_COORDS_INITIALISED // Trying to use this object without setting its coordinates? jassert (colours.size() >= 2); jassert (numEntries > 0); - jassert (approximatelyEqual (colours.getReference(0).position, 0.0)); // The first colour specified has to go at position 0 + jassert (approximatelyEqual (colours.getReference (0).position, 0.0)); // The first colour specified has to go at position 0 int index = 0; diff --git a/modules/juce_graphics/fonts/juce_Font.cpp b/modules/juce_graphics/fonts/juce_Font.cpp index 4aa4182d7f..e5a561f9f6 100644 --- a/modules/juce_graphics/fonts/juce_Font.cpp +++ b/modules/juce_graphics/fonts/juce_Font.cpp @@ -89,7 +89,7 @@ public: for (int i = faces.size(); --i >= 0;) { - CachedFace& face = faces.getReference(i); + CachedFace& face = faces.getReference (i); if (face.typefaceName == faceName && face.typefaceStyle == faceStyle @@ -108,7 +108,7 @@ public: for (int i = faces.size(); --i >= 0;) { - auto lu = faces.getReference(i).lastUsageCount; + auto lu = faces.getReference (i).lastUsageCount; if (bestLastUsageCount > lu) { diff --git a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp index 93571e1d41..9c73cbb5c3 100644 --- a/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp +++ b/modules/juce_graphics/fonts/juce_GlyphArrangement.cpp @@ -177,7 +177,7 @@ void GlyphArrangement::addCurtailedLineOfText (const Font& font, const String& t auto isWhitespace = isNonBreakingSpace (*t) || t.isWhitespace(); glyphs.add (PositionedGlyph (font, t.getAndAdvance(), - newGlyphs.getUnchecked(i), + newGlyphs.getUnchecked (i), xOffset + thisX, yOffset, nextX - thisX, isWhitespace)); } @@ -239,8 +239,8 @@ void GlyphArrangement::addJustifiedText (const Font& font, const String& text, { int i = lineStartIndex; - if (glyphs.getReference(i).getCharacter() != '\n' - && glyphs.getReference(i).getCharacter() != '\r') + if (glyphs.getReference (i).getCharacter() != '\n' + && glyphs.getReference (i).getCharacter() != '\r') ++i; auto lineMaxX = glyphs.getReference (lineStartIndex).getLeft() + maxLineWidth; @@ -256,7 +256,7 @@ void GlyphArrangement::addJustifiedText (const Font& font, const String& text, ++i; if (c == '\r' && i < glyphs.size() - && glyphs.getReference(i).getCharacter() == '\n') + && glyphs.getReference (i).getCharacter() == '\n') ++i; break; diff --git a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp index fe40b14532..8fb1b10916 100644 --- a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp @@ -355,7 +355,7 @@ namespace PNGHelpers static void JUCE_CDECL errorCallback (png_structp p, png_const_charp) { #ifdef PNG_SETJMP_SUPPORTED - setjmp(png_jmpbuf(p)); + setjmp (png_jmpbuf (p)); #else longjmp (*(jmp_buf*) p->error_ptr, 1); #endif diff --git a/modules/juce_graphics/images/juce_ImageCache.cpp b/modules/juce_graphics/images/juce_ImageCache.cpp index cdf6cc327b..2fc852f180 100644 --- a/modules/juce_graphics/images/juce_ImageCache.cpp +++ b/modules/juce_graphics/images/juce_ImageCache.cpp @@ -75,7 +75,7 @@ struct ImageCache::Pimpl : private Timer, for (int i = images.size(); --i >= 0;) { - auto& item = images.getReference(i); + auto& item = images.getReference (i); if (item.image.getReferenceCount() <= 1) { @@ -97,7 +97,7 @@ struct ImageCache::Pimpl : private Timer, const ScopedLock sl (lock); for (int i = images.size(); --i >= 0;) - if (images.getReference(i).image.getReferenceCount() <= 1) + if (images.getReference (i).image.getReferenceCount() <= 1) images.remove (i); } diff --git a/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp b/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp index d848addf84..958ab3029e 100644 --- a/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp +++ b/modules/juce_graphics/native/juce_Direct2DGraphicsContext_windows.cpp @@ -119,7 +119,7 @@ struct Direct2DLowLevelGraphicsContext::Pimpl sink->SetFillMode (D2D1_FILL_MODE_WINDING); for (int i = clipRegion.getNumRectangles(); --i >= 0;) - rectToGeometrySink (clipRegion.getRectangle(i), sink, AffineTransform()); + rectToGeometrySink (clipRegion.getRectangle (i), sink, AffineTransform()); hr = sink->Close(); return p; @@ -449,7 +449,7 @@ public: const auto p1 = fillType.gradient->point1; const auto p2 = fillType.gradient->point2; - const auto r = p1.getDistanceFrom(p2); + const auto r = p1.getDistanceFrom (p2); const auto props = D2D1::RadialGradientBrushProperties ({ p1.x, p1.y }, {}, r, r); owner.pimpl->renderingTarget->CreateRadialGradientBrush (props, brushProps, gradientStops, radialGradient.resetAndGetPointerAddress()); diff --git a/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp b/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp index 18f6a91ca0..423e038776 100644 --- a/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp +++ b/modules/juce_graphics/native/juce_DirectWriteTypeLayout_windows.cpp @@ -191,7 +191,7 @@ namespace DirectWriteTypeLayout { for (int i = 0; i < attributedString.getNumAttributes(); ++i) { - auto& font = attributedString.getAttribute(i).font; + auto& font = attributedString.getAttribute (i).font; auto typeface = font.getTypefacePtr(); if (auto* wt = dynamic_cast (typeface.get())) diff --git a/modules/juce_graphics/native/juce_Fonts_android.cpp b/modules/juce_graphics/native/juce_Fonts_android.cpp index 2c82913b2a..2784728d55 100644 --- a/modules/juce_graphics/native/juce_Fonts_android.cpp +++ b/modules/juce_graphics/native/juce_Fonts_android.cpp @@ -174,12 +174,12 @@ public: fontFile = findFontFile (name, isBold, isItalic); if (fontFile.exists()) - typeface = GlobalRef (LocalRef(env->CallStaticObjectMethod (TypefaceClass, TypefaceClass.createFromFile, - javaString (fontFile.getFullPathName()).get()))); + typeface = GlobalRef (LocalRef (env->CallStaticObjectMethod (TypefaceClass, TypefaceClass.createFromFile, + javaString (fontFile.getFullPathName()).get()))); else - typeface = GlobalRef (LocalRef(env->CallStaticObjectMethod (TypefaceClass, TypefaceClass.create, - javaString (getName()).get(), - (isBold ? 1 : 0) + (isItalic ? 2 : 0)))); + typeface = GlobalRef (LocalRef (env->CallStaticObjectMethod (TypefaceClass, TypefaceClass.create, + javaString (getName()).get(), + (isBold ? 1 : 0) + (isItalic ? 2 : 0)))); } initialise (env); @@ -191,20 +191,20 @@ public: auto* env = getEnv(); auto cacheFile = getCacheFileForData (data, size); - typeface = GlobalRef (LocalRef(env->CallStaticObjectMethod (TypefaceClass, TypefaceClass.createFromFile, - javaString (cacheFile.getFullPathName()).get()))); + typeface = GlobalRef (LocalRef (env->CallStaticObjectMethod (TypefaceClass, TypefaceClass.createFromFile, + javaString (cacheFile.getFullPathName()).get()))); initialise (env); } void initialise (JNIEnv* const env) { - rect = GlobalRef (LocalRef(env->NewObject (AndroidRect, AndroidRect.constructor, 0, 0, 0, 0))); + rect = GlobalRef (LocalRef (env->NewObject (AndroidRect, AndroidRect.constructor, 0, 0, 0, 0))); paint = GlobalRef (GraphicsHelpers::createPaint (Graphics::highResamplingQuality)); const LocalRef ignored (paint.callObjectMethod (AndroidPaint.setTypeface, typeface.get())); - charArray = GlobalRef (LocalRef((jobject) env->NewCharArray (2))); + charArray = GlobalRef (LocalRef ((jobject) env->NewCharArray (2))); paint.callVoidMethod (AndroidPaint.setTextSize, referenceFontSize); @@ -474,7 +474,7 @@ private: jassertfalse; return File(); - } (); + }(); return result; } @@ -492,20 +492,20 @@ private: String key; { - LocalRef digest (env->CallStaticObjectMethod (JavaMessageDigest, JavaMessageDigest.getInstance, javaString("MD5").get())); - LocalRef bytes(env->NewByteArray ((int) size)); + LocalRef digest (env->CallStaticObjectMethod (JavaMessageDigest, JavaMessageDigest.getInstance, javaString ("MD5").get())); + LocalRef bytes (env->NewByteArray ((int) size)); jboolean ignore; - auto* jbytes = env->GetByteArrayElements(bytes.get(), &ignore); - memcpy(jbytes, data, size); - env->ReleaseByteArrayElements(bytes.get(), jbytes, 0); + auto* jbytes = env->GetByteArrayElements (bytes.get(), &ignore); + memcpy (jbytes, data, size); + env->ReleaseByteArrayElements (bytes.get(), jbytes, 0); - env->CallVoidMethod(digest.get(), JavaMessageDigest.update, bytes.get()); - LocalRef result((jbyteArray) env->CallObjectMethod(digest.get(), JavaMessageDigest.digest)); + env->CallVoidMethod (digest.get(), JavaMessageDigest.update, bytes.get()); + LocalRef result ((jbyteArray) env->CallObjectMethod (digest.get(), JavaMessageDigest.digest)); - auto* md5Bytes = env->GetByteArrayElements(result.get(), &ignore); - key = String::toHexString(md5Bytes, env->GetArrayLength(result.get()), 0); - env->ReleaseByteArrayElements(result.get(), md5Bytes, 0); + auto* md5Bytes = env->GetByteArrayElements (result.get(), &ignore); + key = String::toHexString (md5Bytes, env->GetArrayLength (result.get()), 0); + env->ReleaseByteArrayElements (result.get(), md5Bytes, 0); } ScopedLock lock (cs); diff --git a/modules/juce_graphics/native/juce_GraphicsContext_android.cpp b/modules/juce_graphics/native/juce_GraphicsContext_android.cpp index 4a745e2bf7..9763b1da03 100644 --- a/modules/juce_graphics/native/juce_GraphicsContext_android.cpp +++ b/modules/juce_graphics/native/juce_GraphicsContext_android.cpp @@ -37,12 +37,12 @@ namespace GraphicsHelpers if (quality > Graphics::lowResamplingQuality) constructorFlags |= 2; /*FILTER_BITMAP_FLAG*/ - return LocalRef(getEnv()->NewObject (AndroidPaint, AndroidPaint.constructor, constructorFlags)); + return LocalRef (getEnv()->NewObject (AndroidPaint, AndroidPaint.constructor, constructorFlags)); } static LocalRef createMatrix (JNIEnv* env, const AffineTransform& t) { - auto m = LocalRef(env->NewObject (AndroidMatrix, AndroidMatrix.constructor)); + auto m = LocalRef (env->NewObject (AndroidMatrix, AndroidMatrix.constructor)); jfloat values[9] = { t.mat00, t.mat01, t.mat02, t.mat10, t.mat11, t.mat12, diff --git a/modules/juce_graphics/native/juce_IconHelpers_mac.cpp b/modules/juce_graphics/native/juce_IconHelpers_mac.cpp index ce4aa20c66..525010a561 100644 --- a/modules/juce_graphics/native/juce_IconHelpers_mac.cpp +++ b/modules/juce_graphics/native/juce_IconHelpers_mac.cpp @@ -114,12 +114,12 @@ Image JUCE_API getIconFromApplication (const String& applicationPath, const int { if (auto appBundle = CFUniquePtr (CFBundleCreate (kCFAllocatorDefault, url.get()))) { - if (CFTypeRef infoValue = CFBundleGetValueForInfoDictionaryKey (appBundle.get(), CFSTR("CFBundleIconFile"))) + if (CFTypeRef infoValue = CFBundleGetValueForInfoDictionaryKey (appBundle.get(), CFSTR ("CFBundleIconFile"))) { if (CFGetTypeID (infoValue) == CFStringGetTypeID()) { CFStringRef iconFilename = reinterpret_cast (infoValue); - CFStringRef resourceURLSuffix = CFStringHasSuffix (iconFilename, CFSTR(".icns")) ? nullptr : CFSTR("icns"); + CFStringRef resourceURLSuffix = CFStringHasSuffix (iconFilename, CFSTR (".icns")) ? nullptr : CFSTR ("icns"); if (auto iconURL = CFUniquePtr (CFBundleCopyResourceURL (appBundle.get(), iconFilename, resourceURLSuffix, nullptr))) { diff --git a/modules/juce_gui_basics/application/juce_Application.cpp b/modules/juce_gui_basics/application/juce_Application.cpp index bd342bdf85..5242cf517d 100644 --- a/modules/juce_gui_basics/application/juce_Application.cpp +++ b/modules/juce_gui_basics/application/juce_Application.cpp @@ -63,8 +63,8 @@ void JUCEApplication::getCommandInfo (const CommandID commandID, ApplicationComm { if (commandID == StandardApplicationCommandIDs::quit) { - result.setInfo (TRANS("Quit"), - TRANS("Quits the application"), + result.setInfo (TRANS ("Quit"), + TRANS ("Quits the application"), "Application", 0); result.defaultKeypresses.add (KeyPress ('q', ModifierKeys::commandModifier, 0)); diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp index 1536760f85..1d5e55c978 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.cpp +++ b/modules/juce_gui_basics/buttons/juce_Button.cpp @@ -122,7 +122,7 @@ void Button::updateAutomaticTooltip (const ApplicationCommandInfo& info) tt << " ["; if (key.length() == 1) - tt << TRANS("shortcut") << ": '" << key << "']"; + tt << TRANS ("shortcut") << ": '" << key << "']"; else tt << key << ']'; } diff --git a/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp b/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp index 15c773b117..3076ce68f2 100644 --- a/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp +++ b/modules/juce_gui_basics/buttons/juce_ShapeButton.cpp @@ -30,7 +30,7 @@ ShapeButton::ShapeButton (const String& t, Colour n, Colour o, Colour d) : Button (t), normalColour (n), overColour (o), downColour (d), normalColourOn (n), overColourOn (o), downColourOn (d), - useOnColours(false), + useOnColours (false), maintainShapeProportions (false), outlineWidth (0.0f) { diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp index db6f1bbbcc..f45e32bfd5 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp @@ -88,7 +88,7 @@ void ApplicationCommandManager::registerAllCommandsForTarget (ApplicationCommand for (int i = 0; i < commandIDs.size(); ++i) { - ApplicationCommandInfo info (commandIDs.getUnchecked(i)); + ApplicationCommandInfo info (commandIDs.getUnchecked (i)); target->getCommandInfo (info.commandID, info); registerCommand (info); @@ -122,8 +122,8 @@ void ApplicationCommandManager::commandStatusChanged() ApplicationCommandInfo* ApplicationCommandManager::getMutableCommandForID (CommandID commandID) const noexcept { for (int i = commands.size(); --i >= 0;) - if (commands.getUnchecked(i)->commandID == commandID) - return commands.getUnchecked(i); + if (commands.getUnchecked (i)->commandID == commandID) + return commands.getUnchecked (i); return nullptr; } @@ -155,7 +155,7 @@ StringArray ApplicationCommandManager::getCommandCategories() const StringArray s; for (int i = 0; i < commands.size(); ++i) - s.addIfNotAlreadyThere (commands.getUnchecked(i)->categoryName, false); + s.addIfNotAlreadyThere (commands.getUnchecked (i)->categoryName, false); return s; } @@ -165,8 +165,8 @@ Array ApplicationCommandManager::getCommandsInCategory (const String& Array results; for (int i = 0; i < commands.size(); ++i) - if (commands.getUnchecked(i)->categoryName == categoryName) - results.add (commands.getUnchecked(i)->commandID); + if (commands.getUnchecked (i)->categoryName == categoryName) + results.add (commands.getUnchecked (i)->commandID); return results; } diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h index 985951b6a5..041805c46a 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.h @@ -252,7 +252,7 @@ public: If this is set to nullptr, then getFirstCommandTarget() will by default return the result of findDefaultComponentTarget(). - If you use this to set a target, make sure you call setFirstCommandTarget(nullptr) + If you use this to set a target, make sure you call setFirstCommandTarget (nullptr) before deleting the target object. */ void setFirstCommandTarget (ApplicationCommandTarget* newTarget) noexcept; diff --git a/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp b/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp index 84e8a56a05..2c321004ea 100644 --- a/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp +++ b/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.cpp @@ -47,7 +47,7 @@ KeyPressMappingSet::~KeyPressMappingSet() Array KeyPressMappingSet::getKeyPressesAssignedToCommand (const CommandID commandID) const { for (int i = 0; i < mappings.size(); ++i) - if (mappings.getUnchecked(i)->commandID == commandID) + if (mappings.getUnchecked (i)->commandID == commandID) return mappings.getUnchecked (i)->keypresses; return {}; @@ -66,9 +66,9 @@ void KeyPressMappingSet::addKeyPress (const CommandID commandID, const KeyPress& { for (int i = mappings.size(); --i >= 0;) { - if (mappings.getUnchecked(i)->commandID == commandID) + if (mappings.getUnchecked (i)->commandID == commandID) { - mappings.getUnchecked(i)->keypresses.insert (insertIndex, newKeyPress); + mappings.getUnchecked (i)->keypresses.insert (insertIndex, newKeyPress); sendChangeMessage(); return; @@ -132,7 +132,7 @@ void KeyPressMappingSet::clearAllKeyPresses (const CommandID commandID) { for (int i = mappings.size(); --i >= 0;) { - if (mappings.getUnchecked(i)->commandID == commandID) + if (mappings.getUnchecked (i)->commandID == commandID) { mappings.remove (i); sendChangeMessage(); @@ -146,7 +146,7 @@ void KeyPressMappingSet::removeKeyPress (const KeyPress& keypress) { for (int i = mappings.size(); --i >= 0;) { - CommandMapping& cm = *mappings.getUnchecked(i); + CommandMapping& cm = *mappings.getUnchecked (i); for (int j = cm.keypresses.size(); --j >= 0;) { @@ -164,9 +164,9 @@ void KeyPressMappingSet::removeKeyPress (const CommandID commandID, const int ke { for (int i = mappings.size(); --i >= 0;) { - if (mappings.getUnchecked(i)->commandID == commandID) + if (mappings.getUnchecked (i)->commandID == commandID) { - mappings.getUnchecked(i)->keypresses.remove (keyPressIndex); + mappings.getUnchecked (i)->keypresses.remove (keyPressIndex); sendChangeMessage(); break; } @@ -177,8 +177,8 @@ void KeyPressMappingSet::removeKeyPress (const CommandID commandID, const int ke CommandID KeyPressMappingSet::findCommandForKeyPress (const KeyPress& keyPress) const noexcept { for (int i = 0; i < mappings.size(); ++i) - if (mappings.getUnchecked(i)->keypresses.contains (keyPress)) - return mappings.getUnchecked(i)->commandID; + if (mappings.getUnchecked (i)->keypresses.contains (keyPress)) + return mappings.getUnchecked (i)->commandID; return 0; } @@ -186,8 +186,8 @@ CommandID KeyPressMappingSet::findCommandForKeyPress (const KeyPress& keyPress) bool KeyPressMappingSet::containsMapping (const CommandID commandID, const KeyPress& keyPress) const noexcept { for (int i = mappings.size(); --i >= 0;) - if (mappings.getUnchecked(i)->commandID == commandID) - return mappings.getUnchecked(i)->keypresses.contains (keyPress); + if (mappings.getUnchecked (i)->commandID == commandID) + return mappings.getUnchecked (i)->keypresses.contains (keyPress); return false; } @@ -270,7 +270,7 @@ std::unique_ptr KeyPressMappingSet::createXml (const bool saveDiffer for (int i = 0; i < mappings.size(); ++i) { - auto& cm = *mappings.getUnchecked(i); + auto& cm = *mappings.getUnchecked (i); for (int j = 0; j < cm.keypresses.size(); ++j) { @@ -290,7 +290,7 @@ std::unique_ptr KeyPressMappingSet::createXml (const bool saveDiffer { for (int i = 0; i < defaultSet->mappings.size(); ++i) { - auto& cm = *defaultSet->mappings.getUnchecked(i); + auto& cm = *defaultSet->mappings.getUnchecked (i); for (int j = 0; j < cm.keypresses.size(); ++j) { @@ -316,7 +316,7 @@ bool KeyPressMappingSet::keyPressed (const KeyPress& key, Component* const origi for (int i = 0; i < mappings.size(); ++i) { - CommandMapping& cm = *mappings.getUnchecked(i); + CommandMapping& cm = *mappings.getUnchecked (i); if (cm.keypresses.contains (key)) { @@ -354,7 +354,7 @@ bool KeyPressMappingSet::keyStateChanged (const bool /*isKeyDown*/, Component* o for (int i = mappings.size(); --i >= 0;) { - CommandMapping& cm = *mappings.getUnchecked(i); + CommandMapping& cm = *mappings.getUnchecked (i); if (cm.wantsKeyUpDownCallbacks) { @@ -368,7 +368,7 @@ bool KeyPressMappingSet::keyStateChanged (const bool /*isKeyDown*/, Component* o for (int k = keysDown.size(); --k >= 0;) { - if (key == keysDown.getUnchecked(k)->key) + if (key == keysDown.getUnchecked (k)->key) { keyPressEntryIndex = k; wasDown = true; diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 9f720c794b..e3587f780b 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -884,7 +884,7 @@ void Component::sendMovedResizedMessages (bool wasMoved, bool wasResized) for (int i = childComponentList.size(); --i >= 0;) { - childComponentList.getUnchecked(i)->parentSizeChanged(); + childComponentList.getUnchecked (i)->parentSizeChanged(); if (checker.shouldBailOut()) return; @@ -1910,7 +1910,7 @@ void Component::copyAllExplicitColoursTo (Component& target) const for (int i = properties.size(); --i >= 0;) { - auto name = properties.getName(i); + auto name = properties.getName (i); if (name.toString().startsWith (detail::colourPropertyPrefix)) if (target.properties.set (name, properties [name])) diff --git a/modules/juce_gui_basics/desktop/juce_Desktop.cpp b/modules/juce_gui_basics/desktop/juce_Desktop.cpp index 9c4e7517c5..697f536ef7 100644 --- a/modules/juce_gui_basics/desktop/juce_Desktop.cpp +++ b/modules/juce_gui_basics/desktop/juce_Desktop.cpp @@ -74,7 +74,7 @@ Component* Desktop::findComponentAt (Point screenPosition) const for (int i = desktopComponents.size(); --i >= 0;) { - auto* c = desktopComponents.getUnchecked(i); + auto* c = desktopComponents.getUnchecked (i); if (c->isVisible()) { @@ -181,7 +181,7 @@ int Desktop::getNumMouseSources() const noexcept int Desktop::getNumDraggingMouseSources() const noexcept { return mouseSources->getNumDraggingMouseSources(); } MouseInputSource* Desktop::getMouseSource (int index) const noexcept { return mouseSources->getMouseSource (index); } MouseInputSource* Desktop::getDraggingMouseSource (int index) const noexcept { return mouseSources->getDraggingMouseSource (index); } -MouseInputSource Desktop::getMainMouseSource() const noexcept { return MouseInputSource (mouseSources->sources.getUnchecked(0)); } +MouseInputSource Desktop::getMainMouseSource() const noexcept { return MouseInputSource (mouseSources->sources.getUnchecked (0)); } void Desktop::beginDragAutoRepeat (int interval) { mouseSources->beginDragAutoRepeat (interval); } //============================================================================== diff --git a/modules/juce_gui_basics/detail/juce_ComponentHelpers.h b/modules/juce_gui_basics/detail/juce_ComponentHelpers.h index adb50b7455..b815cfb8f8 100644 --- a/modules/juce_gui_basics/detail/juce_ComponentHelpers.h +++ b/modules/juce_gui_basics/detail/juce_ComponentHelpers.h @@ -189,7 +189,7 @@ struct ComponentHelpers for (int i = comp.childComponentList.size(); --i >= 0;) { - auto& child = *comp.childComponentList.getUnchecked(i); + auto& child = *comp.childComponentList.getUnchecked (i); if (child.isVisible() && ! child.isTransformed()) { diff --git a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp index 75a9f1ddbc..e45c075c6c 100644 --- a/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_DirectoryContentsList.cpp @@ -158,7 +158,7 @@ bool DirectoryContentsList::contains (const File& targetFile) const const ScopedLock sl (fileListLock); for (int i = files.size(); --i >= 0;) - if (root.getChildFile (files.getUnchecked(i)->filename) == targetFile) + if (root.getChildFile (files.getUnchecked (i)->filename) == targetFile) return true; return false; @@ -246,7 +246,7 @@ bool DirectoryContentsList::addFile (const File& file, const bool isDir, info->isReadOnly = isReadOnly; for (int i = files.size(); --i >= 0;) - if (files.getUnchecked(i)->filename == info->filename) + if (files.getUnchecked (i)->filename == info->filename) return false; files.add (std::move (info)); diff --git a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp index d55d3db322..bde1ade8f8 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp @@ -323,9 +323,9 @@ void FileBrowserComponent::setFileFilter (const FileFilter* const newFileFilter) String FileBrowserComponent::getActionVerb() const { - return isSaveMode() ? ((flags & canSelectDirectories) != 0 ? TRANS("Choose") - : TRANS("Save")) - : TRANS("Open"); + return isSaveMode() ? ((flags & canSelectDirectories) != 0 ? TRANS ("Choose") + : TRANS ("Save")) + : TRANS ("Open"); } void FileBrowserComponent::setFilenameBoxLabel (const String& name) @@ -529,7 +529,7 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray& for (int i = 0; i < roots.size(); ++i) { - const File& drive = roots.getReference(i); + const File& drive = roots.getReference (i); String name (drive.getFullPathName()); rootPaths.add (name); @@ -539,13 +539,13 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray& String volume (drive.getVolumeLabel()); if (volume.isEmpty()) - volume = TRANS("Hard Drive"); + volume = TRANS ("Hard Drive"); name << " [" << volume << ']'; } else if (drive.isOnCDRomDrive()) { - name << " [" << TRANS("CD/DVD drive") << ']'; + name << " [" << TRANS ("CD/DVD drive") << ']'; } rootNames.add (name); @@ -555,25 +555,25 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray& rootNames.add ({}); rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName()); - rootNames.add (TRANS("Documents")); + rootNames.add (TRANS ("Documents")); rootPaths.add (File::getSpecialLocation (File::userMusicDirectory).getFullPathName()); - rootNames.add (TRANS("Music")); + rootNames.add (TRANS ("Music")); rootPaths.add (File::getSpecialLocation (File::userPicturesDirectory).getFullPathName()); - rootNames.add (TRANS("Pictures")); + rootNames.add (TRANS ("Pictures")); rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName()); - rootNames.add (TRANS("Desktop")); + rootNames.add (TRANS ("Desktop")); #elif JUCE_MAC rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); - rootNames.add (TRANS("Home folder")); + rootNames.add (TRANS ("Home folder")); rootPaths.add (File::getSpecialLocation (File::userDocumentsDirectory).getFullPathName()); - rootNames.add (TRANS("Documents")); + rootNames.add (TRANS ("Documents")); rootPaths.add (File::getSpecialLocation (File::userMusicDirectory).getFullPathName()); - rootNames.add (TRANS("Music")); + rootNames.add (TRANS ("Music")); rootPaths.add (File::getSpecialLocation (File::userPicturesDirectory).getFullPathName()); - rootNames.add (TRANS("Pictures")); + rootNames.add (TRANS ("Pictures")); rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName()); - rootNames.add (TRANS("Desktop")); + rootNames.add (TRANS ("Desktop")); rootPaths.add ({}); rootNames.add ({}); @@ -591,9 +591,9 @@ void FileBrowserComponent::getDefaultRoots (StringArray& rootNames, StringArray& rootPaths.add ("/"); rootNames.add ("/"); rootPaths.add (File::getSpecialLocation (File::userHomeDirectory).getFullPathName()); - rootNames.add (TRANS("Home folder")); + rootNames.add (TRANS ("Home folder")); rootPaths.add (File::getSpecialLocation (File::userDesktopDirectory).getFullPathName()); - rootNames.add (TRANS("Desktop")); + rootNames.add (TRANS ("Desktop")); #endif } diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp index 8ec77d0b85..4342fa51ac 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp @@ -186,12 +186,12 @@ void FileChooserDialogBox::okButtonPressed() { if (warnAboutOverwritingExistingFiles && content->chooserComponent.isSaveMode() - && content->chooserComponent.getSelectedFile(0).exists()) + && content->chooserComponent.getSelectedFile (0).exists()) { auto options = MessageBoxOptions::makeOptionsOkCancel (MessageBoxIconType::WarningIcon, TRANS ("File already exists"), TRANS ("There's already a file called: FLNM") - .replace ("FLNM", content->chooserComponent.getSelectedFile(0).getFullPathName()) + .replace ("FLNM", content->chooserComponent.getSelectedFile (0).getFullPathName()) + "\n\n" + TRANS ("Are you sure you want to overwrite it?"), TRANS ("Overwrite"), @@ -225,13 +225,13 @@ void FileChooserDialogBox::createNewFolder() if (parent.isDirectory()) { - auto* aw = new AlertWindow (TRANS("New Folder"), - TRANS("Please enter the name for the folder"), + auto* aw = new AlertWindow (TRANS ("New Folder"), + TRANS ("Please enter the name for the folder"), MessageBoxIconType::NoIcon, this); aw->addTextEditor ("Folder Name", String(), String(), false); - aw->addButton (TRANS("Create Folder"), 1, KeyPress (KeyPress::returnKey)); - aw->addButton (TRANS("Cancel"), 0, KeyPress (KeyPress::escapeKey)); + aw->addButton (TRANS ("Create Folder"), 1, KeyPress (KeyPress::returnKey)); + aw->addButton (TRANS ("Cancel"), 0, KeyPress (KeyPress::escapeKey)); aw->enterModalState (true, ModalCallbackFunction::forComponent (createNewFolderCallback, this, diff --git a/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp index 1799e7382b..4ad90f1785 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileSearchPathListComponent.cpp @@ -145,7 +145,7 @@ void FileSearchPathListComponent::deleteKeyPressed (int row) void FileSearchPathListComponent::returnKeyPressed (int row) { - chooser = std::make_unique (TRANS("Change folder..."), path.getRawString (row), "*"); + chooser = std::make_unique (TRANS ("Change folder..."), path.getRawString (row), "*"); auto chooserFlags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectDirectories; chooser->launchAsync (chooserFlags, [this, row] (const FileChooser& fc) @@ -222,7 +222,7 @@ void FileSearchPathListComponent::addPath() if (start == File()) start = File::getCurrentWorkingDirectory(); - chooser = std::make_unique (TRANS("Add a folder..."), start, "*"); + chooser = std::make_unique (TRANS ("Add a folder..."), start, "*"); auto chooserFlags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectDirectories; chooser->launchAsync (chooserFlags, [this] (const FileChooser& fc) diff --git a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp index 42732fbdc2..c6a780bea5 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp @@ -221,8 +221,8 @@ ComponentAnimator::~ComponentAnimator() {} ComponentAnimator::AnimationTask* ComponentAnimator::findTaskFor (Component* const component) const noexcept { for (int i = tasks.size(); --i >= 0;) - if (component == tasks.getUnchecked(i)->component.get()) - return tasks.getUnchecked(i); + if (component == tasks.getUnchecked (i)->component.get()) + return tasks.getUnchecked (i); return nullptr; } @@ -287,7 +287,7 @@ void ComponentAnimator::cancelAllAnimations (const bool moveComponentsToTheirFin { if (moveComponentsToTheirFinalPositions) for (int i = tasks.size(); --i >= 0;) - tasks.getUnchecked(i)->moveToFinalDestination(); + tasks.getUnchecked (i)->moveToFinalDestination(); tasks.clear(); sendChangeMessage(); diff --git a/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp b/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp index a3c002cbe0..e034122160 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp @@ -160,7 +160,7 @@ ComponentBuilder::TypeHandler* ComponentBuilder::getHandlerForState (const Value for (int i = 0; i < types.size(); ++i) { - TypeHandler* const t = types.getUnchecked(i); + TypeHandler* const t = types.getUnchecked (i); if (t->type == targetType) return t; @@ -279,7 +279,7 @@ void ComponentBuilder::updateChildComponents (Component& parent, const ValueTree componentsInOrder.getLast()->toFront (false); for (int i = componentsInOrder.size() - 1; --i >= 0;) - componentsInOrder.getUnchecked(i)->toBehind (componentsInOrder.getUnchecked (i + 1)); + componentsInOrder.getUnchecked (i)->toBehind (componentsInOrder.getUnchecked (i + 1)); } } diff --git a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp index bb1fabc382..e47f982a91 100644 --- a/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp +++ b/modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp @@ -95,7 +95,7 @@ struct ConcertinaPanel::PanelSizes if (totalSpace <= 0) { - newSizes.get(index).size = panelHeight; + newSizes.get (index).size = panelHeight; } else { @@ -103,7 +103,7 @@ struct ConcertinaPanel::PanelSizes auto minSize = getMinimumSize (0, num); totalSpace = jmax (totalSpace, minSize); - newSizes.get(index).setSize (panelHeight); + newSizes.get (index).setSize (panelHeight); newSizes.stretchRange (0, index, totalSpace - newSizes.getTotalSize (0, num), stretchLast); newSizes.stretchRange (index, num, totalSpace - newSizes.getTotalSize (0, num), stretchLast); newSizes = newSizes.fittedInto (totalSpace); @@ -139,12 +139,12 @@ private: Array expandableItems; for (int i = start; i < end; ++i) - if (get(i).canExpand() && ! get(i).isMinimised()) - expandableItems.add (& get(i)); + if (get (i).canExpand() && ! get (i).isMinimised()) + expandableItems.add (& get (i)); for (int attempts = 4; --attempts >= 0 && spaceDiff > 0;) for (int i = expandableItems.size(); --i >= 0 && spaceDiff > 0;) - spaceDiff -= expandableItems.getUnchecked(i)->expand (spaceDiff / (i + 1)); + spaceDiff -= expandableItems.getUnchecked (i)->expand (spaceDiff / (i + 1)); growRangeLast (start, end, spaceDiff); } @@ -152,13 +152,13 @@ private: void shrinkRangeFirst (int start, int end, int spaceDiff) noexcept { for (int i = start; i < end && spaceDiff > 0; ++i) - spaceDiff -= get(i).reduce (spaceDiff); + spaceDiff -= get (i).reduce (spaceDiff); } void shrinkRangeLast (int start, int end, int spaceDiff) noexcept { for (int i = end; --i >= start && spaceDiff > 0;) - spaceDiff -= get(i).reduce (spaceDiff); + spaceDiff -= get (i).reduce (spaceDiff); } void stretchRange (int start, int end, int amountToAdd, ExpandMode expandMode) noexcept @@ -290,7 +290,7 @@ private: { ConcertinaPanel& panel = getPanel(); auto ourIndex = panel.holders.indexOf (this); - return panel.currentSizes->get(ourIndex).minSize; + return panel.currentSizes->get (ourIndex).minSize; } ConcertinaPanel& getPanel() const @@ -354,10 +354,10 @@ bool ConcertinaPanel::setPanelSize (Component* panelComponent, int height, bool auto index = indexOfComp (panelComponent); jassert (index >= 0); // The specified component doesn't seem to have been added! - height += currentSizes->get(index).minSize; - auto oldSize = currentSizes->get(index).size; + height += currentSizes->get (index).minSize; + auto oldSize = currentSizes->get (index).size; setLayout (currentSizes->withResizedPanel (index, height, getHeight()), animate); - return oldSize != currentSizes->get(index).size; + return oldSize != currentSizes->get (index).size; } bool ConcertinaPanel::expandPanelFully (Component* component, bool animate) @@ -372,7 +372,7 @@ void ConcertinaPanel::setMaximumPanelSize (Component* component, int maximumSize if (index >= 0) { - currentSizes->get(index).maxSize = currentSizes->get(index).minSize + maximumSize; + currentSizes->get (index).maxSize = currentSizes->get (index).minSize + maximumSize; resized(); } } @@ -411,7 +411,7 @@ void ConcertinaPanel::resized() int ConcertinaPanel::indexOfComp (Component* comp) const noexcept { for (int i = 0; i < holders.size(); ++i) - if (holders.getUnchecked(i)->component == comp) + if (holders.getUnchecked (i)->component == comp) return i; return -1; diff --git a/modules/juce_gui_basics/layout/juce_Grid.cpp b/modules/juce_gui_basics/layout/juce_Grid.cpp index 8534fde615..d271ba719f 100644 --- a/modules/juce_gui_basics/layout/juce_Grid.cpp +++ b/modules/juce_gui_basics/layout/juce_Grid.cpp @@ -545,31 +545,31 @@ struct Grid::Helpers if (alignContent == AlignContent::spaceBetween) { - const auto shift = ((float) (rowNumber - 1) * (calculation.remainingHeight / float(numberOfRows - 1))); + const auto shift = ((float) (rowNumber - 1) * (calculation.remainingHeight / float (numberOfRows - 1))); area.setY (area.getY() + shift); } if (justifyContent == JustifyContent::spaceBetween) { - const auto shift = ((float) (columnNumber - 1) * (calculation.remainingWidth / float(numberOfColumns - 1))); + const auto shift = ((float) (columnNumber - 1) * (calculation.remainingWidth / float (numberOfColumns - 1))); area.setX (area.getX() + shift); } if (alignContent == AlignContent::spaceEvenly) { - const auto shift = ((float) rowNumber * (calculation.remainingHeight / float(numberOfRows + 1))); + const auto shift = ((float) rowNumber * (calculation.remainingHeight / float (numberOfRows + 1))); area.setY (area.getY() + shift); } if (justifyContent == JustifyContent::spaceEvenly) { - const auto shift = ((float) columnNumber * (calculation.remainingWidth / float(numberOfColumns + 1))); + const auto shift = ((float) columnNumber * (calculation.remainingWidth / float (numberOfColumns + 1))); area.setX (area.getX() + shift); } if (alignContent == AlignContent::spaceAround) { - const auto inbetweenShift = calculation.remainingHeight / float(numberOfRows); + const auto inbetweenShift = calculation.remainingHeight / float (numberOfRows); const auto sidesShift = inbetweenShift / 2; auto shift = (float) (rowNumber - 1) * inbetweenShift + sidesShift; @@ -578,7 +578,7 @@ struct Grid::Helpers if (justifyContent == JustifyContent::spaceAround) { - const auto inbetweenShift = calculation.remainingWidth / float(numberOfColumns); + const auto inbetweenShift = calculation.remainingWidth / float (numberOfColumns); const auto sidesShift = inbetweenShift / 2; auto shift = (float) (columnNumber - 1) * inbetweenShift + sidesShift; diff --git a/modules/juce_gui_basics/layout/juce_Grid.h b/modules/juce_gui_basics/layout/juce_Grid.h index 50c6e144c0..75393d30ec 100644 --- a/modules/juce_gui_basics/layout/juce_Grid.h +++ b/modules/juce_gui_basics/layout/juce_Grid.h @@ -43,10 +43,10 @@ public: /** A size in pixels */ struct Px final { - explicit Px (float p) : pixels (static_cast(p)) { /*sta (p >= 0.0f);*/ } - explicit Px (int p) : pixels (static_cast(p)) { /*sta (p >= 0.0f);*/ } + explicit Px (float p) : pixels (static_cast (p)) { /*sta (p >= 0.0f);*/ } + explicit Px (int p) : pixels (static_cast (p)) { /*sta (p >= 0.0f);*/ } explicit constexpr Px (long double p) : pixels (p) {} - explicit constexpr Px (unsigned long long p) : pixels (static_cast(p)) {} + explicit constexpr Px (unsigned long long p) : pixels (static_cast (p)) {} long double pixels; }; diff --git a/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp b/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp index 368e2cba63..5baa0b6cb6 100644 --- a/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp +++ b/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp @@ -118,7 +118,7 @@ void StretchableLayoutManager::setItemPosition (const int itemIndex, { for (int i = items.size(); --i >= 0;) { - auto* layout = items.getUnchecked(i); + auto* layout = items.getUnchecked (i); if (layout->itemIndex == itemIndex) { @@ -291,7 +291,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex, // ..and calculate the end position for (int i = startIndex; i < endIndex; ++i) { - auto* layout = items.getUnchecked(i); + auto* layout = items.getUnchecked (i); startPos += layout->currentSize; } diff --git a/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp b/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp index 30c65f1e96..d5d9962e94 100644 --- a/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp +++ b/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp @@ -65,7 +65,7 @@ void StretchableObjectResizer::resizeToFit (const double targetSize) for (int i = 0; i < items.size(); ++i) { - const Item& it = items.getReference(i); + const Item& it = items.getReference (i); currentSize += it.size; if (it.order <= order) @@ -91,7 +91,7 @@ void StretchableObjectResizer::resizeToFit (const double targetSize) for (int i = 0; i < items.size(); ++i) { - Item& it = items.getReference(i); + Item& it = items.getReference (i); if (it.order <= order) it.size = jlimit (it.minSize, it.maxSize, it.size + (it.maxSize - it.size) * scale); @@ -105,7 +105,7 @@ void StretchableObjectResizer::resizeToFit (const double targetSize) for (int i = 0; i < items.size(); ++i) { - Item& it = items.getReference(i); + Item& it = items.getReference (i); if (it.order <= order) it.size = jmax (it.minSize, it.minSize + (it.size - it.minSize) * scale); diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp index ee0485d0d1..17bb1eccb1 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp @@ -343,7 +343,7 @@ void TabbedButtonBar::setCurrentTabIndex (int newIndex, bool shouldSendChangeMes currentTabIndex = newIndex; for (int i = 0; i < tabs.size(); ++i) - tabs.getUnchecked(i)->button->setToggleState (i == newIndex, dontSendNotification); + tabs.getUnchecked (i)->button->setToggleState (i == newIndex, dontSendNotification); resized(); @@ -365,7 +365,7 @@ TabBarButton* TabbedButtonBar::getTabButton (const int index) const int TabbedButtonBar::indexOfTabButton (const TabBarButton* button) const { for (int i = tabs.size(); --i >= 0;) - if (tabs.getUnchecked(i)->button.get() == button) + if (tabs.getUnchecked (i)->button.get() == button) return i; return -1; @@ -416,7 +416,7 @@ void TabbedButtonBar::updateTabPositions (bool animate) for (int i = 0; i < tabs.size(); ++i) { - auto* tb = tabs.getUnchecked(i)->button.get(); + auto* tb = tabs.getUnchecked (i)->button.get(); totalLength += tb->getBestTabLength (depth) - overlap; tb->overlapPixels = jmax (0, overlap / 2); @@ -459,7 +459,7 @@ void TabbedButtonBar::updateTabPositions (bool animate) for (int i = 0; i < tabs.size(); ++i) { - auto* tb = tabs.getUnchecked(i)->button.get(); + auto* tb = tabs.getUnchecked (i)->button.get(); auto newLength = totalLength + tb->getBestTabLength (depth); if (i > 0 && newLength * minimumScale > tabsButtonPos) @@ -557,7 +557,7 @@ void TabbedButtonBar::showExtraItemsMenu() for (int i = 0; i < tabs.size(); ++i) { - auto* tab = tabs.getUnchecked(i); + auto* tab = tabs.getUnchecked (i); if (! tab->button->isVisible()) m.addItem (PopupMenu::Item (tab->name) diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index 9cf2b16b42..41d7db3871 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -1745,7 +1745,7 @@ void LookAndFeel_V2::drawTooltip (Graphics& g, const String& text, int width, in //============================================================================== Button* LookAndFeel_V2::createFilenameComponentBrowseButton (const String& text) { - return new TextButton (text, TRANS("click to browse for a different file")); + return new TextButton (text, TRANS ("click to browse for a different file")); } void LookAndFeel_V2::layoutFilenameComponent (FilenameComponent& filenameComp, diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp index 8ad233b048..677a3d9939 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V3.cpp @@ -521,7 +521,7 @@ void LookAndFeel_V3::drawKeymapChangeButton (Graphics& g, int width, int height, p.addRectangle (50.0f - thickness, 50.0f + thickness, thickness * 2.0f, 50.0f - indent - thickness); p.setUsingNonZeroWinding (false); - g.setColour (textColour.darker(0.1f).withAlpha (button.isDown() ? 0.7f : (button.isOver() ? 0.5f : 0.3f))); + g.setColour (textColour.darker (0.1f).withAlpha (button.isDown() ? 0.7f : (button.isOver() ? 0.5f : 0.3f))); g.fillPath (p, p.getTransformToScaleToFit (2.0f, 2.0f, (float) width - 4.0f, (float) height - 4.0f, true)); } diff --git a/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h b/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h index f670992b48..7de6aff72e 100644 --- a/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h +++ b/modules/juce_gui_basics/mouse/juce_SelectedItemSet.h @@ -104,9 +104,9 @@ public: { for (int i = selectedItems.size(); --i >= 0;) { - if (selectedItems.getUnchecked(i) != item) + if (selectedItems.getUnchecked (i) != item) { - deselect (selectedItems.getUnchecked(i)); + deselect (selectedItems.getUnchecked (i)); i = jmin (i, selectedItems.size()); } } diff --git a/modules/juce_gui_basics/native/juce_FileChooser_android.cpp b/modules/juce_gui_basics/native/juce_FileChooser_android.cpp index b28166e046..c0fce10e40 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_android.cpp +++ b/modules/juce_gui_basics/native/juce_FileChooser_android.cpp @@ -128,7 +128,7 @@ public: auto allMimeTypesHaveSameGroup = true; LocalRef jMimeTypes (env->NewObjectArray (mimeTypes.size(), JavaString, - javaString("").get())); + javaString ("").get())); for (int i = 0; i < mimeTypes.size(); ++i) { diff --git a/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp b/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp index 351eb4f94d..3efa71e9ac 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp +++ b/modules/juce_gui_basics/native/juce_FileChooser_windows.cpp @@ -142,7 +142,7 @@ private: void resized() override { - if (Component* const c = getChildComponent(0)) + if (Component* const c = getChildComponent (0)) c->setBounds (getLocalBounds()); } diff --git a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm index 2215fba8b4..1b43bf9285 100644 --- a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm +++ b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm @@ -720,16 +720,16 @@ namespace MainMenuHelpers [NSApp setServicesMenu: servicesMenu]; [menu addItem: [NSMenuItem separatorItem]]; - createMenuItem (menu, TRANS("Hide") + String (" ") + appName, @selector (hide:), nsStringLiteral ("h")); + createMenuItem (menu, TRANS ("Hide") + String (" ") + appName, @selector (hide:), nsStringLiteral ("h")); - [createMenuItem (menu, TRANS("Hide Others"), @selector (hideOtherApplications:), nsStringLiteral ("h")) + [createMenuItem (menu, TRANS ("Hide Others"), @selector (hideOtherApplications:), nsStringLiteral ("h")) setKeyEquivalentModifierMask: NSEventModifierFlagCommand | NSEventModifierFlagOption]; - createMenuItem (menu, TRANS("Show All"), @selector (unhideAllApplications:), nsEmptyString()); + createMenuItem (menu, TRANS ("Show All"), @selector (unhideAllApplications:), nsEmptyString()); [menu addItem: [NSMenuItem separatorItem]]; - createMenuItem (menu, TRANS("Quit") + String (" ") + appName, @selector (terminate:), nsStringLiteral ("q")); + createMenuItem (menu, TRANS ("Quit") + String (" ") + appName, @selector (terminate:), nsStringLiteral ("q")); } // Since our app has no NIB, this initialises a standard app menu... diff --git a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm index a2b72bef85..f5c64234b7 100644 --- a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm +++ b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm @@ -1896,7 +1896,7 @@ private: case NSEventTypeRightMouseUp: case NSEventTypeOtherMouseUp: case NSEventTypeOtherMouseDragged: - if (Desktop::getInstance().getDraggingMouseSource(0) != nullptr) + if (Desktop::getInstance().getDraggingMouseSource (0) != nullptr) return false; break; diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index cb0e62701a..f824d64091 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -984,7 +984,7 @@ static bool attemptToConsumeKeys (JuceUIView* view, NSSet* presses) return used; } -- (void) pressesBegan:(NSSet*) presses withEvent:(UIPressesEvent*) event +- (void) pressesBegan: (NSSet*) presses withEvent: (UIPressesEvent*) event { const auto handledEvent = [&] { @@ -1033,13 +1033,13 @@ static bool doKeysUp (UIViewComponentPeer* owner, NSSet* presses, UIPr return false; } -- (void) pressesEnded:(NSSet*) presses withEvent:(UIPressesEvent*) event +- (void) pressesEnded: (NSSet*) presses withEvent: (UIPressesEvent*) event { if (! doKeysUp (owner, presses, event)) [super pressesEnded: presses withEvent: event]; } -- (void) pressesCancelled:(NSSet*) presses withEvent:(UIPressesEvent*) event +- (void) pressesCancelled: (NSSet*) presses withEvent: (UIPressesEvent*) event { if (! doKeysUp (owner, presses, event)) [super pressesCancelled: presses withEvent: event]; diff --git a/modules/juce_gui_basics/native/juce_Windowing_android.cpp b/modules/juce_gui_basics/native/juce_Windowing_android.cpp index 2e82e41deb..54023247d0 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_android.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_android.cpp @@ -904,7 +904,7 @@ const uint8 javaComponentPeerView[] void juce_firebaseDeviceNotificationsTokenRefreshed (void*); void juce_firebaseRemoteNotificationReceived (void*); void juce_firebaseRemoteMessagesDeleted(); - void juce_firebaseRemoteMessageSent(void*); + void juce_firebaseRemoteMessageSent (void*); void juce_firebaseRemoteMessageSendError (void*, void*); #endif @@ -2776,7 +2776,7 @@ void SystemClipboard::copyTextToClipboard (const String& text) auto* env = getEnv(); LocalRef clipboardManager (env->CallObjectMethod (getAppContext().get(), AndroidContext.getSystemService, javaString ("clipboard").get())); - env->CallVoidMethod (clipboardManager.get(), AndroidClipboardManager.setText, javaString(text).get()); + env->CallVoidMethod (clipboardManager.get(), AndroidClipboardManager.setText, javaString (text).get()); } String SystemClipboard::getTextFromClipboard() @@ -2789,7 +2789,7 @@ String SystemClipboard::getTextFromClipboard() if (charSequence == nullptr) return {}; - return juceString(LocalRef ((jstring) env->CallObjectMethod(charSequence.get(), JavaCharSequence.toString))); + return juceString (LocalRef ((jstring) env->CallObjectMethod (charSequence.get(), JavaCharSequence.toString))); } //============================================================================== diff --git a/modules/juce_gui_basics/native/juce_Windowing_ios.mm b/modules/juce_gui_basics/native/juce_Windowing_ios.mm index fabe167bea..2a62a5eb5c 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_ios.mm +++ b/modules/juce_gui_basics/native/juce_Windowing_ios.mm @@ -189,7 +189,7 @@ JUCE_END_IGNORE_WARNINGS_GCC_LIKE isIOSAppActive = false; for (int i = appBecomingInactiveCallbacks.size(); --i >= 0;) - appBecomingInactiveCallbacks.getReference(i)->appBecomingInactive(); + appBecomingInactiveCallbacks.getReference (i)->appBecomingInactive(); } - (void) application: (UIApplication*) application handleEventsForBackgroundURLSession: (NSString*)identifier diff --git a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp index fc4b5b7dce..3e4ca8748d 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp @@ -2548,7 +2548,7 @@ private: case WM_POINTERHWHEEL: case WM_POINTERUP: case WM_POINTERACTIVATE: - return isHWNDBlockedByModalComponents(m.hwnd); + return isHWNDBlockedByModalComponents (m.hwnd); case WM_NCLBUTTONDOWN: case WM_NCLBUTTONDBLCLK: case WM_NCRBUTTONDOWN: @@ -5270,7 +5270,7 @@ private: case NoCursor: return std::make_unique (nullptr); case WaitCursor: cursorName = IDC_WAIT; break; case IBeamCursor: cursorName = IDC_IBEAM; break; - case PointingHandCursor: cursorName = MAKEINTRESOURCE(32649); break; + case PointingHandCursor: cursorName = MAKEINTRESOURCE (32649); break; case CrosshairCursor: cursorName = IDC_CROSS; break; case LeftRightResizeCursor: diff --git a/modules/juce_gui_basics/positioning/juce_MarkerList.cpp b/modules/juce_gui_basics/positioning/juce_MarkerList.cpp index 0cfee9f6d1..29cd2679b1 100644 --- a/modules/juce_gui_basics/positioning/juce_MarkerList.cpp +++ b/modules/juce_gui_basics/positioning/juce_MarkerList.cpp @@ -59,7 +59,7 @@ bool MarkerList::operator== (const MarkerList& other) const noexcept for (int i = markers.size(); --i >= 0;) { - const Marker* const m1 = markers.getUnchecked(i); + const Marker* const m1 = markers.getUnchecked (i); jassert (m1 != nullptr); const Marker* const m2 = other.getMarker (m1->name); @@ -96,7 +96,7 @@ MarkerList::Marker* MarkerList::getMarkerByName (const String& name) const noexc { for (int i = 0; i < markers.size(); ++i) { - Marker* const m = markers.getUnchecked(i); + Marker* const m = markers.getUnchecked (i); if (m->name == name) return m; @@ -135,7 +135,7 @@ void MarkerList::removeMarker (const String& name) { for (int i = 0; i < markers.size(); ++i) { - const Marker* const m = markers.getUnchecked(i); + const Marker* const m = markers.getUnchecked (i); if (m->name == name) { @@ -278,7 +278,7 @@ void MarkerList::ValueTreeWrapper::readFrom (const MarkerList& markerList, UndoM state.removeAllChildren (undoManager); for (int i = 0; i < markerList.getNumMarkers(); ++i) - setMarker (*markerList.getMarker(i), undoManager); + setMarker (*markerList.getMarker (i), undoManager); } } // namespace juce diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp index be1322b28a..c5ac113724 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp @@ -323,10 +323,10 @@ void RelativeCoordinatePositionerBase::registerMarkerListListener (MarkerList* c void RelativeCoordinatePositionerBase::unregisterListeners() { for (int i = sourceComponents.size(); --i >= 0;) - sourceComponents.getUnchecked(i)->removeComponentListener (this); + sourceComponents.getUnchecked (i)->removeComponentListener (this); for (int i = sourceMarkerLists.size(); --i >= 0;) - sourceMarkerLists.getUnchecked(i)->removeListener (this); + sourceMarkerLists.getUnchecked (i)->removeListener (this); sourceComponents.clear(); sourceMarkerLists.clear(); diff --git a/modules/juce_gui_basics/positioning/juce_RelativePointPath.cpp b/modules/juce_gui_basics/positioning/juce_RelativePointPath.cpp index 04748c8497..8c98d92b71 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativePointPath.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativePointPath.cpp @@ -37,7 +37,7 @@ RelativePointPath::RelativePointPath (const RelativePointPath& other) containsDynamicPoints (false) { for (int i = 0; i < other.elements.size(); ++i) - elements.add (other.elements.getUnchecked(i)->clone()); + elements.add (other.elements.getUnchecked (i)->clone()); } RelativePointPath::RelativePointPath (const Path& path) @@ -71,8 +71,8 @@ bool RelativePointPath::operator== (const RelativePointPath& other) const noexce for (int i = 0; i < elements.size(); ++i) { - ElementBase* const e1 = elements.getUnchecked(i); - ElementBase* const e2 = other.elements.getUnchecked(i); + ElementBase* const e1 = elements.getUnchecked (i); + ElementBase* const e2 = other.elements.getUnchecked (i); if (e1->type != e2->type) return false; @@ -106,7 +106,7 @@ void RelativePointPath::swapWith (RelativePointPath& other) noexcept void RelativePointPath::createPath (Path& path, Expression::Scope* scope) const { for (int i = 0; i < elements.size(); ++i) - elements.getUnchecked(i)->addToPath (path, scope); + elements.getUnchecked (i)->addToPath (path, scope); } bool RelativePointPath::containsAnyDynamicPoints() const diff --git a/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp b/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp index a8ce138af8..a501e15563 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeRectangle.cpp @@ -64,7 +64,7 @@ namespace RelativeRectangleHelpers else { for (int i = e.getNumInputs(); --i >= 0;) - if (dependsOnSymbolsOtherThanThis (e.getInput(i))) + if (dependsOnSymbolsOtherThanThis (e.getInput (i))) return true; } diff --git a/modules/juce_gui_basics/properties/juce_PropertyComponent.cpp b/modules/juce_gui_basics/properties/juce_PropertyComponent.cpp index 6fc0eb3f77..dc190ee0d8 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyComponent.cpp +++ b/modules/juce_gui_basics/properties/juce_PropertyComponent.cpp @@ -44,7 +44,7 @@ void PropertyComponent::paint (Graphics& g) void PropertyComponent::resized() { - if (auto c = getChildComponent(0)) + if (auto c = getChildComponent (0)) c->setBounds (getLookAndFeel().getPropertyComponentContentPosition (*this)); } diff --git a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp index 65741ad9cd..9f8ce9a51a 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp +++ b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp @@ -200,7 +200,7 @@ PropertyPanel::PropertyPanel (const String& name) : Component (name) void PropertyPanel::init() { - messageWhenEmpty = TRANS("(nothing selected)"); + messageWhenEmpty = TRANS ("(nothing selected)"); addAndMakeVisible (viewport); viewport.setViewedComponent (propertyHolderComponent = new PropertyHolderComponent()); diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index e7aa618bb0..9dc8fcf0cc 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -28,7 +28,7 @@ namespace juce ComboBox::ComboBox (const String& name) : Component (name), - noChoicesMessage (TRANS("(no choices)")) + noChoicesMessage (TRANS ("(no choices)")) { setRepaintsOnMouseActivity (true); lookAndFeelChanged(); diff --git a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp index 11075ace7e..c7f0e595af 100644 --- a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp +++ b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp @@ -325,7 +325,7 @@ void TableHeaderComponent::resizeColumnsToFit (int firstColumnIndex, int targetT for (int i = firstColumnIndex; i < columns.size(); ++i) { - auto* ci = columns.getUnchecked(i); + auto* ci = columns.getUnchecked (i); if (ci->isVisible()) sor.addItem (ci->lastDeliberateWidth, ci->minimumWidth, ci->maximumWidth); @@ -336,7 +336,7 @@ void TableHeaderComponent::resizeColumnsToFit (int firstColumnIndex, int targetT for (int i = firstColumnIndex; i < columns.size(); ++i) { - auto* ci = columns.getUnchecked(i); + auto* ci = columns.getUnchecked (i); if (ci->isVisible()) { @@ -718,7 +718,7 @@ void TableHeaderComponent::beginDrag (const MouseEvent& e) for (int i = listeners.size(); --i >= 0;) { - listeners.getUnchecked(i)->tableColumnDraggingChanged (this, columnIdBeingDragged); + listeners.getUnchecked (i)->tableColumnDraggingChanged (this, columnIdBeingDragged); i = jmin (i, listeners.size() - 1); } } @@ -737,7 +737,7 @@ void TableHeaderComponent::endDrag (const int finalIndex) for (int i = listeners.size(); --i >= 0;) { - listeners.getUnchecked(i)->tableColumnDraggingChanged (this, 0); + listeners.getUnchecked (i)->tableColumnDraggingChanged (this, 0); i = jmin (i, listeners.size() - 1); } } @@ -790,7 +790,7 @@ int TableHeaderComponent::visibleIndexToTotalIndex (const int visibleIndex) cons for (int i = 0; i < columns.size(); ++i) { - if (columns.getUnchecked(i)->isVisible()) + if (columns.getUnchecked (i)->isVisible()) { if (n == visibleIndex) return i; @@ -826,7 +826,7 @@ void TableHeaderComponent::handleAsyncUpdate() { for (int i = listeners.size(); --i >= 0;) { - listeners.getUnchecked(i)->tableSortOrderChanged (this); + listeners.getUnchecked (i)->tableSortOrderChanged (this); i = jmin (i, listeners.size() - 1); } } @@ -835,7 +835,7 @@ void TableHeaderComponent::handleAsyncUpdate() { for (int i = listeners.size(); --i >= 0;) { - listeners.getUnchecked(i)->tableColumnsChanged (this); + listeners.getUnchecked (i)->tableColumnsChanged (this); i = jmin (i, listeners.size() - 1); } } @@ -844,7 +844,7 @@ void TableHeaderComponent::handleAsyncUpdate() { for (int i = listeners.size(); --i >= 0;) { - listeners.getUnchecked(i)->tableColumnsResized (this); + listeners.getUnchecked (i)->tableColumnsResized (this); i = jmin (i, listeners.size() - 1); } } diff --git a/modules/juce_gui_basics/widgets/juce_TableListBox.cpp b/modules/juce_gui_basics/widgets/juce_TableListBox.cpp index 5e78b00d1c..6f05dfd654 100644 --- a/modules/juce_gui_basics/widgets/juce_TableListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_TableListBox.cpp @@ -322,8 +322,8 @@ public: { if (owner.isAutoSizeMenuOptionShown()) { - menu.addItem (autoSizeColumnId, TRANS("Auto-size this column"), columnIdClicked != 0); - menu.addItem (autoSizeAllId, TRANS("Auto-size all columns"), owner.getHeader().getNumColumns (true) > 0); + menu.addItem (autoSizeColumnId, TRANS ("Auto-size this column"), columnIdClicked != 0); + menu.addItem (autoSizeAllId, TRANS ("Auto-size all columns"), owner.getHeader().getNumColumns (true) > 0); menu.addSeparator(); } diff --git a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp index 1cf648adda..5455b086c9 100644 --- a/modules/juce_gui_basics/widgets/juce_TextEditor.cpp +++ b/modules/juce_gui_basics/widgets/juce_TextEditor.cpp @@ -89,7 +89,7 @@ public: if (! CharacterFunctions::isWhitespace (lastAtom.atomText.getLastCharacter())) { - auto& first = other.atoms.getReference(0); + auto& first = other.atoms.getReference (0); if (! CharacterFunctions::isWhitespace (first.atomText[0])) { @@ -105,7 +105,7 @@ public: while (i < other.atoms.size()) { - atoms.add (other.atoms.getReference(i)); + atoms.add (other.atoms.getReference (i)); ++i; } } @@ -118,7 +118,7 @@ public: for (int i = 0; i < atoms.size(); ++i) { - auto& atom = atoms.getReference(i); + auto& atom = atoms.getReference (i); auto nextIndex = index + atom.numChars; if (index == indexToBreakAt) @@ -587,7 +587,7 @@ struct TextEditor::Iterator int j; for (j = 0; j < numGlyphs; ++j) { - auto& pg = g.getGlyph(j); + auto& pg = g.getGlyph (j); if ((pg.getLeft() + pg.getRight()) / 2 > xToFind) break; @@ -1807,20 +1807,20 @@ void TextEditor::addPopupMenuItems (PopupMenu& m, const MouseEvent*) if (passwordCharacter == 0) { - m.addItem (StandardApplicationCommandIDs::cut, TRANS("Cut"), writable); - m.addItem (StandardApplicationCommandIDs::copy, TRANS("Copy"), ! selection.isEmpty()); + m.addItem (StandardApplicationCommandIDs::cut, TRANS ("Cut"), writable); + m.addItem (StandardApplicationCommandIDs::copy, TRANS ("Copy"), ! selection.isEmpty()); } - m.addItem (StandardApplicationCommandIDs::paste, TRANS("Paste"), writable); - m.addItem (StandardApplicationCommandIDs::del, TRANS("Delete"), writable); + m.addItem (StandardApplicationCommandIDs::paste, TRANS ("Paste"), writable); + m.addItem (StandardApplicationCommandIDs::del, TRANS ("Delete"), writable); m.addSeparator(); - m.addItem (StandardApplicationCommandIDs::selectAll, TRANS("Select All")); + m.addItem (StandardApplicationCommandIDs::selectAll, TRANS ("Select All")); m.addSeparator(); if (getUndoManager() != nullptr) { - m.addItem (StandardApplicationCommandIDs::undo, TRANS("Undo"), undoManager.canUndo()); - m.addItem (StandardApplicationCommandIDs::redo, TRANS("Redo"), undoManager.canRedo()); + m.addItem (StandardApplicationCommandIDs::undo, TRANS ("Undo"), undoManager.canUndo()); + m.addItem (StandardApplicationCommandIDs::redo, TRANS ("Redo"), undoManager.canRedo()); } } @@ -2389,7 +2389,7 @@ void TextEditor::reinsert (int insertIndex, const OwnedArray if (insertIndex == index) { for (int j = sectionsToInsert.size(); --j >= 0;) - sections.insert (i, new UniformTextSection (*sectionsToInsert.getUnchecked(j))); + sections.insert (i, new UniformTextSection (*sectionsToInsert.getUnchecked (j))); break; } @@ -2399,7 +2399,7 @@ void TextEditor::reinsert (int insertIndex, const OwnedArray splitSection (i, insertIndex - index); for (int j = sectionsToInsert.size(); --j >= 0;) - sections.insert (i + 1, new UniformTextSection (*sectionsToInsert.getUnchecked(j))); + sections.insert (i + 1, new UniformTextSection (*sectionsToInsert.getUnchecked (j))); break; } @@ -2424,7 +2424,7 @@ void TextEditor::remove (Range range, UndoManager* const um, const int care for (int i = 0; i < sections.size(); ++i) { - auto nextIndex = index + sections.getUnchecked(i)->getTotalLength(); + auto nextIndex = index + sections.getUnchecked (i)->getTotalLength(); if (range.getStart() > index && range.getStart() < nextIndex) { diff --git a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp index e1f39c040b..4a3ffb54d6 100644 --- a/modules/juce_gui_basics/widgets/juce_Toolbar.cpp +++ b/modules/juce_gui_basics/widgets/juce_Toolbar.cpp @@ -161,7 +161,7 @@ public: { for (int i = bar.items.size(); --i >= 0;) { - auto* tc = bar.items.getUnchecked(i); + auto* tc = bar.items.getUnchecked (i); if (tc != nullptr && dynamic_cast (tc) == nullptr && ! tc->isVisible()) { @@ -385,7 +385,7 @@ String Toolbar::toString() const String s ("TB:"); for (int i = 0; i < getNumItems(); ++i) - s << getItemId(i) << ' '; + s << getItemId (i) << ' '; return s.trimEnd(); } @@ -660,7 +660,7 @@ class Toolbar::CustomisationDialog : public DialogWindow { public: CustomisationDialog (ToolbarItemFactory& factory, Toolbar& bar, int optionFlags) - : DialogWindow (TRANS("Add/remove items from toolbar"), Colours::white, true, true), + : DialogWindow (TRANS ("Add/remove items from toolbar"), Colours::white, true, true), toolbar (bar) { setContentOwned (new CustomiserPanel (factory, toolbar, optionFlags), true); @@ -733,9 +733,9 @@ private: addAndMakeVisible (styleBox); styleBox.setEditableText (false); - if ((optionFlags & Toolbar::allowIconsOnlyChoice) != 0) styleBox.addItem (TRANS("Show icons only"), 1); - if ((optionFlags & Toolbar::allowIconsWithTextChoice) != 0) styleBox.addItem (TRANS("Show icons and descriptions"), 2); - if ((optionFlags & Toolbar::allowTextOnlyChoice) != 0) styleBox.addItem (TRANS("Show descriptions only"), 3); + if ((optionFlags & Toolbar::allowIconsOnlyChoice) != 0) styleBox.addItem (TRANS ("Show icons only"), 1); + if ((optionFlags & Toolbar::allowIconsWithTextChoice) != 0) styleBox.addItem (TRANS ("Show icons and descriptions"), 2); + if ((optionFlags & Toolbar::allowTextOnlyChoice) != 0) styleBox.addItem (TRANS ("Show descriptions only"), 3); int selectedStyle = 0; switch (bar.getStyle()) diff --git a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp index 31e8f9cf08..c2aec877a3 100644 --- a/modules/juce_gui_basics/windows/juce_AlertWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_AlertWindow.cpp @@ -344,7 +344,7 @@ void AlertWindow::paint (Graphics& g) for (int i = textBoxes.size(); --i >= 0;) { - auto* te = textBoxes.getUnchecked(i); + auto* te = textBoxes.getUnchecked (i); g.drawFittedText (textboxNames[i], te->getX(), te->getY() - 14, @@ -354,7 +354,7 @@ void AlertWindow::paint (Graphics& g) for (int i = comboBoxNames.size(); --i >= 0;) { - auto* cb = comboBoxes.getUnchecked(i); + auto* cb = comboBoxes.getUnchecked (i); g.drawFittedText (comboBoxNames[i], cb->getX(), cb->getY() - 14, @@ -556,7 +556,7 @@ bool AlertWindow::keyPressed (const KeyPress& key) if (key.isKeyCode (KeyPress::returnKey) && buttons.size() == 1) { - buttons.getUnchecked(0)->triggerClick(); + buttons.getUnchecked (0)->triggerClick(); return true; } @@ -589,7 +589,7 @@ void AlertWindow::showMessageBox (MessageBoxIconType iconType, .withIconType (iconType) .withTitle (title) .withMessage (message) - .withButton (buttonText.isEmpty() ? TRANS("OK") : buttonText) + .withButton (buttonText.isEmpty() ? TRANS ("OK") : buttonText) .withAssociatedComponent (associatedComponent)); } diff --git a/modules/juce_gui_basics/windows/juce_NativeMessageBox.cpp b/modules/juce_gui_basics/windows/juce_NativeMessageBox.cpp index b5cf95879b..7344e433bf 100644 --- a/modules/juce_gui_basics/windows/juce_NativeMessageBox.cpp +++ b/modules/juce_gui_basics/windows/juce_NativeMessageBox.cpp @@ -89,7 +89,7 @@ void JUCE_CALLTYPE NativeMessageBox::showMessageBox (MessageBoxIconType iconType showNativeBoxUnmanaged (MessageBoxOptions().withIconType (iconType) .withTitle (title) .withMessage (message) - .withButton (TRANS("OK")) + .withButton (TRANS ("OK")) .withAssociatedComponent (associatedComponent), nullptr, ResultCodeMappingMode::plainIndex); diff --git a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp index 2cd5ff42da..6fe2b827f2 100644 --- a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp @@ -39,7 +39,7 @@ ThreadWithProgressWindow::ThreadWithProgressWindow (const String& title, { alertWindow.reset (LookAndFeel::getDefaultLookAndFeel() .createAlertWindow (title, {}, - cancelButtonText.isEmpty() ? TRANS("Cancel") + cancelButtonText.isEmpty() ? TRANS ("Cancel") : cancelButtonText, {}, {}, MessageBoxIconType::NoIcon, hasCancelButton ? 1 : 0, componentToCentreAround)); diff --git a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp index 0d0f235893..aca7c3376a 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp +++ b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp @@ -590,7 +590,7 @@ String CodeDocument::getTextBetween (const Position& start, const Position& end) for (int i = jmax (0, startLine); i <= maxLine; ++i) { - auto& line = *lines.getUnchecked(i); + auto& line = *lines.getUnchecked (i); auto len = line.lineLength; if (i == startLine) diff --git a/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp b/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp index e0b3c7b6ad..7984603c91 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp +++ b/modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp @@ -584,7 +584,7 @@ void CodeEditorComponent::paint (Graphics& g) RectangleList highlightArea; for (int i = firstLineToDraw; i < lastLineToDraw; ++i) - if (const auto area = lines.getUnchecked(i)->getHighlightArea (x, lineHeight * i, lineHeight, charWidth)) + if (const auto area = lines.getUnchecked (i)->getHighlightArea (x, lineHeight * i, lineHeight, charWidth)) highlightArea.add (*area); g.setColour (findColour (CodeEditorComponent::highlightColourId)); @@ -592,7 +592,7 @@ void CodeEditorComponent::paint (Graphics& g) } for (int i = firstLineToDraw; i < lastLineToDraw; ++i) - lines.getUnchecked(i)->draw (*this, g, font, rightClip, x, lineHeight * i, lineHeight, charWidth); + lines.getUnchecked (i)->draw (*this, g, font, rightClip, x, lineHeight * i, lineHeight, charWidth); } void CodeEditorComponent::setScrollbarThickness (const int thickness) @@ -635,7 +635,7 @@ void CodeEditorComponent::rebuildLineTokens() for (int i = 0; i < numNeeded; ++i) { - if (lines.getUnchecked(i)->update (document, firstLineOnScreen + i, source, codeTokeniser, + if (lines.getUnchecked (i)->update (document, firstLineOnScreen + i, source, codeTokeniser, spacesPerTab, selectionStart, selectionEnd)) { minLineToRepaint = jmin (minLineToRepaint, i); diff --git a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp index c885d0e3c3..ca201322fc 100644 --- a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp +++ b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp @@ -263,9 +263,9 @@ public: void mouseDown (const MouseEvent&) override { PopupMenu m; - m.addItem (1, TRANS("Use this swatch as the current colour")); + m.addItem (1, TRANS ("Use this swatch as the current colour")); m.addSeparator(); - m.addItem (2, TRANS("Set this swatch to the current colour")); + m.addItem (2, TRANS ("Set this swatch to the current colour")); m.showMenuAsync (PopupMenu::Options().withTargetComponent (this), ModalCallbackFunction::forComponent (menuStaticCallback, this)); @@ -598,7 +598,7 @@ void ColourSelector::resized() for (int i = 0; i < swatchComponents.size(); ++i) { - auto* sc = swatchComponents.getUnchecked(i); + auto* sc = swatchComponents.getUnchecked (i); sc->setBounds (x + xGap / 2, y + yGap / 2, diff --git a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp index 72a97fad14..5cf0c5f9fa 100644 --- a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp +++ b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp @@ -39,8 +39,8 @@ public: setWantsKeyboardFocus (false); setTriggeredOnMouseDown (keyNum >= 0); - setTooltip (keyIndex < 0 ? TRANS("Adds a new key-mapping") - : TRANS("Click to change this key-mapping")); + setTooltip (keyIndex < 0 ? TRANS ("Adds a new key-mapping") + : TRANS ("Click to change this key-mapping")); } void paintButton (Graphics& g, bool /*isOver*/, bool /*isDown*/) override @@ -56,7 +56,7 @@ public: Component::SafePointer button (this); PopupMenu m; - m.addItem (TRANS("Change this key-mapping"), + m.addItem (TRANS ("Change this key-mapping"), [button] { if (button != nullptr) @@ -65,7 +65,7 @@ public: m.addSeparator(); - m.addItem (TRANS("Remove this key-mapping"), + m.addItem (TRANS ("Remove this key-mapping"), [button] { if (button != nullptr) @@ -96,13 +96,13 @@ public: { public: KeyEntryWindow (KeyMappingEditorComponent& kec) - : AlertWindow (TRANS("New key-mapping"), - TRANS("Please press a key combination now..."), + : AlertWindow (TRANS ("New key-mapping"), + TRANS ("Please press a key combination now..."), MessageBoxIconType::NoIcon), owner (kec) { - addButton (TRANS("OK"), 1); - addButton (TRANS("Cancel"), 0); + addButton (TRANS ("OK"), 1); + addButton (TRANS ("Cancel"), 0); // (avoid return + escape keys getting processed by the buttons..) for (auto* child : getChildren()) @@ -115,13 +115,13 @@ public: bool keyPressed (const KeyPress& key) override { lastPress = key; - String message (TRANS("Key") + ": " + owner.getDescriptionForKeyPress (key)); + String message (TRANS ("Key") + ": " + owner.getDescriptionForKeyPress (key)); auto previousCommand = owner.getMappings().findCommandForKeyPress (key); if (previousCommand != 0) message << "\n\n(" - << TRANS("Currently assigned to \"CMDN\"") + << TRANS ("Currently assigned to \"CMDN\"") .replace ("CMDN", TRANS (owner.getCommandManager().getNameOfCommand (previousCommand))) << ')'; @@ -160,13 +160,13 @@ public: else { auto options = MessageBoxOptions::makeOptionsOkCancel (MessageBoxIconType::WarningIcon, - TRANS("Change key-mapping"), - TRANS("This key is already assigned to the command \"CMDN\"") + TRANS ("Change key-mapping"), + TRANS ("This key is already assigned to the command \"CMDN\"") .replace ("CMDN", owner.getCommandManager().getNameOfCommand (previousCommand)) + "\n\n" - + TRANS("Do you want to re-assign it to this new command instead?"), - TRANS("Re-assign"), - TRANS("Cancel"), + + TRANS ("Do you want to re-assign it to this new command instead?"), + TRANS ("Re-assign"), + TRANS ("Cancel"), this); messageBox = AlertWindow::showScopedAsync (options, [this, newKey] (int result) { @@ -252,7 +252,7 @@ public: for (int i = keyChangeButtons.size(); --i >= 0;) { - auto* b = keyChangeButtons.getUnchecked(i); + auto* b = keyChangeButtons.getUnchecked (i); b->fitToContent (getHeight() - 2); b->setTopRightPosition (x, 1); @@ -396,9 +396,9 @@ KeyMappingEditorComponent::KeyMappingEditorComponent (KeyPressMappingSet& mappin resetButton.onClick = [this] { auto options = MessageBoxOptions::makeOptionsOkCancel (MessageBoxIconType::QuestionIcon, - TRANS("Reset to defaults"), - TRANS("Are you sure you want to reset all the key-mappings to their default state?"), - TRANS("Reset"), + TRANS ("Reset to defaults"), + TRANS ("Are you sure you want to reset all the key-mappings to their default state?"), + TRANS ("Reset"), {}, this); messageBox = AlertWindow::showScopedAsync (options, [this] (int result) diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp index 0c87de8724..3ea9659305 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp @@ -55,13 +55,13 @@ private: Array alreadyDone; for (int i = TopLevelWindow::getNumTopLevelWindows(); --i >= 0;) - if (auto* c = TopLevelWindow::getTopLevelWindow(i)) + if (auto* c = TopLevelWindow::getTopLevelWindow (i)) repaintAndResizeAllComps (c, alreadyDone); auto& desktop = Desktop::getInstance(); for (int i = desktop.getNumComponents(); --i >= 0;) - if (auto* c = desktop.getComponent(i)) + if (auto* c = desktop.getComponent (i)) repaintAndResizeAllComps (c, alreadyDone); } @@ -75,7 +75,7 @@ private: for (int i = c->getNumChildComponents(); --i >= 0;) { - if (auto* child = c->getChildComponent(i)) + if (auto* child = c->getChildComponent (i)) { repaintAndResizeAllComps (child, alreadyDone); alreadyDone.add (child); @@ -100,7 +100,7 @@ int64 parseInt (String s) return -parseInt (s.substring (1)); if (s.startsWith ("0x")) - return s.substring(2).getHexValue64(); + return s.substring (2).getHexValue64(); return s.getLargeIntValue(); } @@ -282,7 +282,7 @@ public: auto r = getLocalBounds().reduced (2, 0); for (int i = 0; i < editors.size(); ++i) - editors.getUnchecked(i)->setBounds (r.removeFromTop (itemHeight)); + editors.getUnchecked (i)->setBounds (r.removeFromTop (itemHeight)); } enum { itemHeight = 120 }; diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h index ddea280f28..9f12166ef1 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.h @@ -76,7 +76,7 @@ namespace LiveConstantEditor template inline String getAsCode (Type& v, bool preferHex) { return getAsString (v, preferHex); } inline String getAsCode (Colour v, bool) { return "Colour (0x" + String::toHexString ((int) v.getARGB()).paddedLeft ('0', 8) + ")"; } - inline String getAsCode (const String& v, bool) { return CppTokeniserFunctions::addEscapeChars(v).quoted(); } + inline String getAsCode (const String& v, bool) { return CppTokeniserFunctions::addEscapeChars (v).quoted(); } inline String getAsCode (const char* v, bool) { return getAsCode (String (v), false); } template diff --git a/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp b/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp index b90412cf29..8bcb9c89b0 100644 --- a/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp +++ b/modules/juce_gui_extra/misc/juce_PreferencesPanel.cpp @@ -102,7 +102,7 @@ void PreferencesPanel::showInDialogBox (const String& dialogTitle, int dialogWid void PreferencesPanel::resized() { for (int i = 0; i < buttons.size(); ++i) - buttons.getUnchecked(i)->setBounds (i * buttonSize, 0, buttonSize, buttonSize); + buttons.getUnchecked (i)->setBounds (i * buttonSize, 0, buttonSize, buttonSize); if (currentPage != nullptr) currentPage->setBounds (getLocalBounds().withTop (buttonSize + 5)); diff --git a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp index c5a4efb8d8..3ab3f8426b 100644 --- a/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp +++ b/modules/juce_gui_extra/misc/juce_RecentlyOpenedFilesList.cpp @@ -70,7 +70,7 @@ void RecentlyOpenedFilesList::removeFile (const File& file) void RecentlyOpenedFilesList::removeNonExistentFiles() { for (int i = getNumFiles(); --i >= 0;) - if (! getFile(i).exists()) + if (! getFile (i).exists()) files.remove (i); } @@ -85,7 +85,7 @@ int RecentlyOpenedFilesList::createPopupMenuItems (PopupMenu& menuToAddTo, for (int i = 0; i < getNumFiles(); ++i) { - const File f (getFile(i)); + const File f (getFile (i)); if ((! dontAddNonExistentFiles) || f.exists()) { diff --git a/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h b/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h index 3cc5ba8fbc..c6a73e2859 100644 --- a/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h +++ b/modules/juce_gui_extra/misc/juce_WebBrowserComponent.h @@ -96,7 +96,7 @@ public: handy to stop the browser using resources in the background when it's not actually being used. */ - [[nodiscard]] Options withKeepPageLoadedWhenBrowserIsHidden () const { return withMember (*this, &Options::keepPageLoadedWhenBrowserIsHidden, true); } + [[nodiscard]] Options withKeepPageLoadedWhenBrowserIsHidden() const { return withMember (*this, &Options::keepPageLoadedWhenBrowserIsHidden, true); } /** Use a specific user agent string when requesting web pages. diff --git a/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp b/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp index d4d9a45e07..7a4d501c97 100644 --- a/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp +++ b/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp @@ -165,7 +165,7 @@ namespace ActiveXHelpers *result = static_cast (inplaceSite); return S_OK; } - else if (type == __uuidof(IDispatch) && dispatchEventHandler != nullptr) + else if (type == __uuidof (IDispatch) && dispatchEventHandler != nullptr) { dispatchEventHandler->AddRef(); *result = dispatchEventHandler; @@ -202,7 +202,7 @@ namespace ActiveXHelpers auto iidIDispatch = __uuidof (IDispatch); - if (static_cast(eventHandler)->QueryInterface (iidIDispatch, (void**) &newEventHandler) != S_OK + if (static_cast (eventHandler)->QueryInterface (iidIDispatch, (void**) &newEventHandler) != S_OK || newEventHandler == nullptr) return; diff --git a/modules/juce_gui_extra/native/juce_AndroidViewComponent.cpp b/modules/juce_gui_extra/native/juce_AndroidViewComponent.cpp index 031cf0c074..f76b468af2 100644 --- a/modules/juce_gui_extra/native/juce_AndroidViewComponent.cpp +++ b/modules/juce_gui_extra/native/juce_AndroidViewComponent.cpp @@ -156,7 +156,7 @@ void AndroidViewComponent::setView (void* view) // explicitly create a new local ref here so that we don't // delete the users pointer auto* env = getEnv(); - auto localref = LocalRef(env->NewLocalRef((jobject) view)); + auto localref = LocalRef (env->NewLocalRef ((jobject) view)); pimpl.reset (new Pimpl (localref, *this)); diff --git a/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm b/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm index 9dddc12a19..1db064bc5f 100644 --- a/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm +++ b/modules/juce_gui_extra/native/juce_AppleRemote_mac.mm @@ -189,7 +189,7 @@ bool AppleRemoteDevice::open (const bool openInExclusiveMode) for (int i = 0; i < cookies.size(); ++i) { - IOHIDElementCookie cookie = (IOHIDElementCookie) cookies.getUnchecked(i); + IOHIDElementCookie cookie = (IOHIDElementCookie) cookies.getUnchecked (i); (*(IOHIDQueueInterface**) queue)->addElement ((IOHIDQueueInterface**) queue, cookie, 0); } diff --git a/modules/juce_gui_extra/native/juce_PushNotifications_android.cpp b/modules/juce_gui_extra/native/juce_PushNotifications_android.cpp index b382a3b9e3..6c4c1382d2 100644 --- a/modules/juce_gui_extra/native/juce_PushNotifications_android.cpp +++ b/modules/juce_gui_extra/native/juce_PushNotifications_android.cpp @@ -436,7 +436,7 @@ struct PushNotifications::Pimpl //============================================================================== String getDeviceToken() const { - #if defined(JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) auto* env = getEnv(); auto instanceId = LocalRef (env->CallStaticObjectMethod (FirebaseInstanceId, FirebaseInstanceId.getInstance)); @@ -449,7 +449,7 @@ struct PushNotifications::Pimpl void notifyListenersTokenRefreshed ([[maybe_unused]] const String& token) { - #if defined(JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) MessageManager::callAsync ([this, token] { owner.listeners.call ([&] (Listener& l) { l.deviceTokenRefreshed (token); }); @@ -460,7 +460,7 @@ struct PushNotifications::Pimpl //============================================================================== void subscribeToTopic ([[maybe_unused]] const String& topic) { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) auto* env = getEnv(); auto firebaseMessaging = LocalRef (env->CallStaticObjectMethod (FirebaseMessaging, @@ -472,7 +472,7 @@ struct PushNotifications::Pimpl void unsubscribeFromTopic ([[maybe_unused]] const String& topic) { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) auto* env = getEnv(); auto firebaseMessaging = LocalRef (env->CallStaticObjectMethod (FirebaseMessaging, @@ -489,7 +489,7 @@ struct PushNotifications::Pimpl [[maybe_unused]] int timeToLive, [[maybe_unused]] const StringPairArray& additionalData) { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) auto* env = getEnv(); auto messageBuilder = LocalRef (env->NewObject (RemoteMessageBuilder, @@ -520,7 +520,7 @@ struct PushNotifications::Pimpl void notifyListenersAboutRemoteNotificationFromSystemTray ([[maybe_unused]] const LocalRef& intent) { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) auto* env = getEnv(); auto bundle = LocalRef (env->CallObjectMethod (intent, AndroidIntent.getExtras)); @@ -532,7 +532,7 @@ struct PushNotifications::Pimpl void notifyListenersAboutRemoteNotificationFromService ([[maybe_unused]] const LocalRef& remoteNotification) { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) GlobalRef rn (remoteNotification); MessageManager::callAsync ([this, rn] @@ -545,7 +545,7 @@ struct PushNotifications::Pimpl void notifyListenersAboutRemoteNotificationsDeleted() { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) MessageManager::callAsync ([this] { owner.listeners.call ([] (Listener& l) { l.remoteNotificationsDeleted(); }); @@ -555,8 +555,8 @@ struct PushNotifications::Pimpl void notifyListenersAboutUpstreamMessageSent ([[maybe_unused]] const LocalRef& messageId) { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) - GlobalRef mid (LocalRef(messageId.get())); + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + GlobalRef mid (LocalRef (messageId.get())); MessageManager::callAsync ([this, mid] { @@ -569,8 +569,8 @@ struct PushNotifications::Pimpl void notifyListenersAboutUpstreamMessageSendingError ([[maybe_unused]] const LocalRef& messageId, [[maybe_unused]] const LocalRef& error) { - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) - GlobalRef mid (LocalRef(messageId.get())), e (LocalRef(error.get())); + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + GlobalRef mid (LocalRef (messageId.get())), e (LocalRef (error.get())); MessageManager::callAsync ([this, mid, e] { @@ -1301,7 +1301,7 @@ struct PushNotifications::Pimpl return {}; } - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) static PushNotifications::Notification firebaseRemoteNotificationToJuceNotification (jobject remoteNotification) { auto* env = getEnv(); @@ -1533,7 +1533,7 @@ struct PushNotifications::Pimpl PushNotifications& owner; }; -#if defined(JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) +#if defined (JUCE_FIREBASE_INSTANCE_ID_SERVICE_CLASSNAME) //============================================================================== struct JuceFirebaseInstanceIdService { @@ -1551,7 +1551,7 @@ struct JuceFirebaseInstanceIdService }; #endif -#if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) +#if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) //============================================================================== struct JuceFirebaseMessagingService { @@ -1611,7 +1611,7 @@ bool juce_handleNotificationIntent (void* intent) return true; } - #if defined(JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) + #if defined (JUCE_FIREBASE_MESSAGING_SERVICE_CLASSNAME) else if (PushNotifications::Pimpl::isRemoteNotificationIntent ((jobject) intent)) { if (instance) diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp b/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp index b5e819b81c..b44a5cc4de 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp @@ -746,7 +746,7 @@ private: int status = 0, result = 0; result = waitpid (childProcess, &status, WNOHANG); - for (int i = 0; i < 15 && (! WIFEXITED(status) || result != childProcess); ++i) + for (int i = 0; i < 15 && (! WIFEXITED (status) || result != childProcess); ++i) { Thread::sleep (100); result = waitpid (childProcess, &status, WNOHANG); @@ -754,7 +754,7 @@ private: // clean-up any zombies status = 0; - if (! WIFEXITED(status) || result != childProcess) + if (! WIFEXITED (status) || result != childProcess) { for (;;) { diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm index fddcb6e90b..7c6a33a54a 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm @@ -342,7 +342,7 @@ struct API_AVAILABLE (macos (10.10)) WebViewDelegateClass : public ObjCClass (TRANS("Select the file you want to upload..."), + auto chooser = std::make_unique (TRANS ("Select the file you want to upload..."), File::getSpecialLocation (File::userHomeDirectory), "*"); auto* wrapper = new DeletedFileChooserWrapper (std::move (chooser), completionHandler); diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp b/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp index 8a6afb7262..917c6bbf21 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp @@ -126,7 +126,7 @@ public: StringArray headers; if (userAgent.isNotEmpty()) - headers.add("User-Agent: " + userAgent); + headers.add ("User-Agent: " + userAgent); if (requestedHeaders != nullptr) headers.addArray (*requestedHeaders); @@ -262,8 +262,8 @@ private: if (dispIdMember == /*DISPID_AMBIENT_USERAGENT*/-5513) { - V_VT( pVarResult ) = VT_BSTR; - V_BSTR( pVarResult ) = SysAllocString ((const OLECHAR*) String(owner.userAgent).toWideCharPointer());; + V_VT ( pVarResult ) = VT_BSTR; + V_BSTR ( pVarResult ) = SysAllocString ((const OLECHAR*) String (owner.userAgent).toWideCharPointer());; return S_OK; } @@ -537,7 +537,7 @@ public: //============================================================================== struct WebViewHandle { - using LibraryRef = std::unique_ptr::element_type, decltype(&::FreeLibrary)>; + using LibraryRef = std::unique_ptr::element_type, decltype (&::FreeLibrary)>; LibraryRef loaderHandle {nullptr, &::FreeLibrary}; ComSmartPtr environment; }; @@ -942,8 +942,8 @@ private: newBounds = (newBounds.toDouble() * peer->getPlatformScaleFactor()).toNearestInt(); #endif - webViewController->put_Bounds({ newBounds.getX(), newBounds.getY(), - newBounds.getRight(), newBounds.getBottom() }); + webViewController->put_Bounds ({ newBounds.getX(), newBounds.getY(), + newBounds.getRight(), newBounds.getBottom() }); } } diff --git a/modules/juce_opengl/native/juce_OpenGL_android.h b/modules/juce_opengl/native/juce_OpenGL_android.h index dbfeff68a2..2543b85eec 100644 --- a/modules/juce_opengl/native/juce_OpenGL_android.h +++ b/modules/juce_opengl/native/juce_OpenGL_android.h @@ -125,10 +125,10 @@ public: return; // create a native surface view - surfaceView = GlobalRef (LocalRef(env->NewObject (JuceOpenGLViewSurface, - JuceOpenGLViewSurface.constructor, - getAppContext().get(), - reinterpret_cast (this)))); + surfaceView = GlobalRef (LocalRef (env->NewObject (JuceOpenGLViewSurface, + JuceOpenGLViewSurface.constructor, + getAppContext().get(), + reinterpret_cast (this)))); if (surfaceView.get() == nullptr) return; diff --git a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp index 09bc9dbb7a..0c12b31752 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp @@ -162,7 +162,7 @@ private: { for (int i = images.size(); --i >= 0;) { - auto& ci = *images.getUnchecked(i); + auto& ci = *images.getUnchecked (i); if (ci.pixelData == im) { @@ -1214,7 +1214,7 @@ struct StateHelpers for (int i = 0; i < numTexturesToCache - 2; ++i) { - auto* t = textures.getUnchecked(i); + auto* t = textures.getUnchecked (i); if (t->getWidth() == w && t->getHeight() == h) return textures.removeAndReturn (i); diff --git a/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp b/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp index f9a2cc7f3f..ef6b5fd754 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.cpp @@ -60,7 +60,7 @@ void OpenGLShaderProgram::release() noexcept double OpenGLShaderProgram::getLanguageVersion() { return String::fromUTF8 ((const char*) glGetString (GL_SHADING_LANGUAGE_VERSION)) - .retainCharacters("1234567890.").getDoubleValue(); + .retainCharacters ("1234567890.").getDoubleValue(); } bool OpenGLShaderProgram::addShader (const String& code, GLenum type) diff --git a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.cpp b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.cpp index ba618d4a8f..ac86e152f8 100644 --- a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.cpp +++ b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockForm.cpp @@ -73,7 +73,7 @@ struct OnlineUnlockForm::OverlayComp : public Component, g.setColour (Colours::black); g.setFont (15.0f); - g.drawFittedText (TRANS("Contacting XYZ...").replace ("XYZ", form.status.getWebsiteName()), + g.drawFittedText (TRANS ("Contacting XYZ...").replace ("XYZ", form.status.getWebsiteName()), getLocalBounds().reduced (20, 0).removeFromTop (proportionOfHeight (0.6f)), Justification::centred, 5); } @@ -170,7 +170,7 @@ OnlineUnlockForm::OnlineUnlockForm (OnlineUnlockStatus& s, bool overlayHasCancelButton) : message (String(), userInstructions), passwordBox (String(), getDefaultPasswordChar()), - registerButton (TRANS("Register")), + registerButton (TRANS ("Register")), cancelButton (TRANS ("Cancel")), status (s), showOverlayCancelButton (overlayHasCancelButton) @@ -267,8 +267,8 @@ void OnlineUnlockForm::lookAndFeelChanged() { Colour labelCol (findColour (TextEditor::backgroundColourId).contrasting (0.5f)); - emailBox.setTextToShowWhenEmpty (TRANS("Email Address"), labelCol); - passwordBox.setTextToShowWhenEmpty (TRANS("Password"), labelCol); + emailBox.setTextToShowWhenEmpty (TRANS ("Email Address"), labelCol); + passwordBox.setTextToShowWhenEmpty (TRANS ("Password"), labelCol); } void OnlineUnlockForm::showBubbleMessage (const String& text, Component& target) diff --git a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp index 99b550f47f..100793e4c6 100644 --- a/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp +++ b/modules/juce_product_unlocking/marketplace/juce_OnlineUnlockStatus.cpp @@ -125,7 +125,7 @@ struct KeyFileUtils xml = parseXML (mb.toString()); } - return xml != nullptr ? *xml : XmlElement("key"); + return xml != nullptr ? *xml : XmlElement ("key"); } static XmlElement getXmlFromKeyFile (String keyFileText, RSAKey rsaPublicKey) @@ -461,17 +461,17 @@ OnlineUnlockStatus::UnlockResult OnlineUnlockStatus::handleFailedConnection() String OnlineUnlockStatus::getMessageForConnectionFailure (bool isInternetConnectionWorking) { - String message = TRANS("Couldn't connect to XYZ").replace ("XYZ", getWebsiteName()) + "...\n\n"; + String message = TRANS ("Couldn't connect to XYZ").replace ("XYZ", getWebsiteName()) + "...\n\n"; if (isInternetConnectionWorking) - message << TRANS("Your internet connection seems to be OK, but our webserver " - "didn't respond... This is most likely a temporary problem, so try " - "again in a few minutes, but if it persists, please contact us for support!"); + message << TRANS ("Your internet connection seems to be OK, but our webserver " + "didn't respond... This is most likely a temporary problem, so try " + "again in a few minutes, but if it persists, please contact us for support!"); else - message << TRANS("No internet sites seem to be accessible from your computer.. Before trying again, " - "please check that your network is working correctly, and make sure " - "that any firewall/security software installed on your machine isn't " - "blocking your web connection."); + message << TRANS ("No internet sites seem to be accessible from your computer.. Before trying again, " + "please check that your network is working correctly, and make sure " + "that any firewall/security software installed on your machine isn't " + "blocking your web connection."); return message; } @@ -479,7 +479,7 @@ String OnlineUnlockStatus::getMessageForConnectionFailure (bool isInternetConnec String OnlineUnlockStatus::getMessageForUnexpectedReply() { return TRANS ("Unexpected or corrupted reply from XYZ").replace ("XYZ", getWebsiteName()) + "...\n\n" - + TRANS("Please try again in a few minutes, and contact us for support if this message appears again."); + + TRANS ("Please try again in a few minutes, and contact us for support if this message appears again."); } OnlineUnlockStatus::UnlockResult OnlineUnlockStatus::attemptWebserverUnlock (const String& email, diff --git a/modules/juce_product_unlocking/native/juce_InAppPurchases_android.cpp b/modules/juce_product_unlocking/native/juce_InAppPurchases_android.cpp index bed2c81123..5915a0560a 100644 --- a/modules/juce_product_unlocking/native/juce_InAppPurchases_android.cpp +++ b/modules/juce_product_unlocking/native/juce_InAppPurchases_android.cpp @@ -935,7 +935,7 @@ private: auto* env = getEnv(); - if (env->CallIntMethod(purchase, AndroidPurchase.getPurchaseState) != 1 /* PURCHASED */) + if (env->CallIntMethod (purchase, AndroidPurchase.getPurchaseState) != 1 /* PURCHASED */) return {}; return { juceString (LocalRef { (jstring) env->CallObjectMethod (purchase, AndroidPurchase.getOrderId) }), @@ -1058,7 +1058,7 @@ private: } //============================================================================== - JUCE_DECLARE_WEAK_REFERENCEABLE(Pimpl) + JUCE_DECLARE_WEAK_REFERENCEABLE (Pimpl) JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Pimpl) }; diff --git a/modules/juce_product_unlocking/native/juce_InAppPurchases_ios.cpp b/modules/juce_product_unlocking/native/juce_InAppPurchases_ios.cpp index cfca74f45a..d966b6d5d8 100644 --- a/modules/juce_product_unlocking/native/juce_InAppPurchases_ios.cpp +++ b/modules/juce_product_unlocking/native/juce_InAppPurchases_ios.cpp @@ -600,7 +600,7 @@ struct InAppPurchases::Pimpl NSMutableArray* skDownloads = [NSMutableArray arrayWithCapacity: (NSUInteger) downloads.size()]; for (const auto& d : downloads) - if (auto impl = dynamic_cast(d)) + if (auto impl = dynamic_cast (d)) [skDownloads addObject: impl->download]; return skDownloads; diff --git a/modules/juce_video/native/juce_CameraDevice_android.h b/modules/juce_video/native/juce_CameraDevice_android.h index 45a21ef5fe..218bb8ac10 100644 --- a/modules/juce_video/native/juce_CameraDevice_android.h +++ b/modules/juce_video/native/juce_CameraDevice_android.h @@ -1631,7 +1631,7 @@ private: env->CallVoidMethod (captureRequestBuilder, CaptureRequestBuilder.addTarget, surface.get()); } - previewCaptureRequest = GlobalRef (LocalRef(env->CallObjectMethod (captureRequestBuilder, CaptureRequestBuilder.build))); + previewCaptureRequest = GlobalRef (LocalRef (env->CallObjectMethod (captureRequestBuilder, CaptureRequestBuilder.build))); env->CallIntMethod (captureSession, CameraCaptureSession.setRepeatingRequest, previewCaptureRequest.get(), nullptr, handlerToUse.get()); @@ -1687,7 +1687,7 @@ private: { JUCE_CAMERA_LOG ("Taking picture..."); - stillPictureCaptureRequest = GlobalRef (LocalRef(stillPictureCaptureRequestToUse)); + stillPictureCaptureRequest = GlobalRef (LocalRef (stillPictureCaptureRequestToUse)); lockFocus(); } @@ -3094,7 +3094,7 @@ private: auto quitSafelyMethod = env->GetMethodID (AndroidHandlerThread, "quitSafely", "()Z"); // this code will only run on SDK >= 21 - jassert(quitSafelyMethod != nullptr); + jassert (quitSafelyMethod != nullptr); env->CallBooleanMethod (handlerThread, quitSafelyMethod); env->CallVoidMethod (handlerThread, AndroidHandlerThread.join); diff --git a/modules/juce_video/native/juce_CameraDevice_windows.h b/modules/juce_video/native/juce_CameraDevice_windows.h index 4ffbb4fe35..8c2124af1e 100644 --- a/modules/juce_video/native/juce_CameraDevice_windows.h +++ b/modules/juce_video/native/juce_CameraDevice_windows.h @@ -67,7 +67,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster } } - hr = graphBuilder->AddFilter (filter, _T("Video Capture")); + hr = graphBuilder->AddFilter (filter, _T ("Video Capture")); if (FAILED (hr)) return; @@ -75,7 +75,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster if (FAILED (hr)) return; - hr = graphBuilder->AddFilter (smartTee, _T("Smart Tee")); + hr = graphBuilder->AddFilter (smartTee, _T ("Smart Tee")); if (FAILED (hr)) return; @@ -105,7 +105,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster callback = new GrabberCallback (*this); hr = sampleGrabber->SetCallback (callback, 1); - hr = graphBuilder->AddFilter (sampleGrabberBase, _T("Sample Grabber")); + hr = graphBuilder->AddFilter (sampleGrabberBase, _T ("Sample Grabber")); if (FAILED (hr)) return; @@ -130,7 +130,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster ComSmartPtr nullFilter; hr = nullFilter.CoCreateInstance (ComTypes::CLSID_NullRenderer); - hr = graphBuilder->AddFilter (nullFilter, _T("Null Renderer")); + hr = graphBuilder->AddFilter (nullFilter, _T ("Null Renderer")); if (connectFilters (sampleGrabberBase, nullFilter) && addGraphToRot()) @@ -349,7 +349,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster if (SUCCEEDED (hr)) { - hr = graphBuilder->AddFilter (asfWriter, _T("AsfWriter")); + hr = graphBuilder->AddFilter (asfWriter, _T ("AsfWriter")); if (SUCCEEDED (hr)) { @@ -496,7 +496,7 @@ struct CameraDevice::Pimpl : public ChangeBroadcaster VARIANT var; var.vt = VT_BSTR; - hr = propertyBag->Read (_T("FriendlyName"), &var, nullptr); + hr = propertyBag->Read (_T ("FriendlyName"), &var, nullptr); propertyBag = nullptr; if (SUCCEEDED (hr)) @@ -729,7 +729,7 @@ private: ComSmartPtr moniker; WCHAR buffer[128]{}; - HRESULT hr = CreateItemMoniker (_T("!"), buffer, moniker.resetAndGetPointerAddress()); + HRESULT hr = CreateItemMoniker (_T ("!"), buffer, moniker.resetAndGetPointerAddress()); if (FAILED (hr)) return false; @@ -824,7 +824,7 @@ private: void CameraDevice::Pimpl::disconnectAnyViewers() { for (int i = viewerComps.size(); --i >= 0;) - viewerComps.getUnchecked(i)->ownerDeleted(); + viewerComps.getUnchecked (i)->ownerDeleted(); } String CameraDevice::getFileExtension()