From 83e5264c86ee09063dc0e0f9d45eda5b1d79a3d3 Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 17 Nov 2025 19:00:05 +0000 Subject: [PATCH] Formatting: Remove double-dots from comments and other strings --- extras/BinaryBuilder/Source/Main.cpp | 2 +- .../buffers/juce_AudioDataConverters.cpp | 4 +-- .../buffers/juce_AudioDataConverters.h | 12 +++---- .../midi/juce_MidiMessage.cpp | 8 ++--- .../juce_audio_basics/midi/juce_MidiMessage.h | 2 +- .../mpe/juce_MPEInstrument.cpp | 34 +++++++++---------- .../mpe/juce_MPESynthesiser.cpp | 4 +-- .../sources/juce_BufferingAudioSource.cpp | 2 +- .../sources/juce_ResamplingAudioSource.cpp | 4 +-- .../synthesisers/juce_Synthesiser.cpp | 4 +-- .../utilities/juce_Decibels.h | 2 +- .../audio_io/juce_AudioDeviceManager.cpp | 2 +- .../midi_io/juce_MidiMessageCollector.cpp | 2 +- .../native/juce_ALSA_linux.cpp | 10 +++--- .../native/juce_ASIO_windows.cpp | 30 ++++++++-------- .../native/juce_CoreAudio_mac.cpp | 4 +-- .../native/juce_DirectSound_windows.cpp | 6 ++-- .../native/juce_OpenSL_android.cpp | 4 +-- .../native/juce_WASAPI_windows.cpp | 2 +- .../sources/juce_AudioSourcePlayer.cpp | 2 +- .../sources/juce_AudioTransportSource.cpp | 2 +- .../codecs/juce_AiffAudioFormat.cpp | 10 +++--- .../codecs/juce_FlacAudioFormat.cpp | 2 +- .../codecs/juce_OggVorbisAudioFormat.cpp | 2 +- .../codecs/juce_WavAudioFormat.cpp | 10 +++--- .../codecs/juce_WavAudioFormat.h | 2 +- .../format/juce_AudioFormatReader.cpp | 4 +-- .../sampler/juce_Sampler.cpp | 2 +- .../detail/juce_CheckSettingMacros.h | 2 +- .../detail/juce_VSTWindowUtilities.h | 2 +- .../juce_audio_plugin_client_AAX.cpp | 2 +- .../juce_audio_plugin_client_AU_1.mm | 2 +- .../juce_audio_plugin_client_LV2.cpp | 2 +- .../juce_audio_plugin_client_VST2.cpp | 26 +++++++------- .../format_types/juce_VST3PluginFormat.cpp | 2 +- .../format_types/juce_VSTPluginFormat.cpp | 4 +-- .../processors/juce_AudioProcessorEditor.cpp | 6 ++-- .../scanning/juce_KnownPluginList.cpp | 4 +-- .../scanning/juce_PluginDirectoryScanner.cpp | 6 ++-- .../format_types/juce_AU_Shared.h | 2 +- .../juce_AudioUnitPluginFormatImpl.h | 2 +- .../juce_LADSPAPluginFormatHeadless.cpp | 2 +- .../format_types/juce_VSTPluginFormatImpl.h | 8 ++--- .../processors/juce_AudioPluginInstance.cpp | 2 +- .../processors/juce_AudioProcessor.cpp | 4 +-- .../processors/juce_AudioProcessor.h | 2 +- .../processors/juce_AudioProcessorGraph.cpp | 24 ++++++------- .../gui/juce_MidiKeyboardComponent.cpp | 2 +- .../native/juce_AudioCDReader_windows.cpp | 6 ++-- modules/juce_core/containers/juce_Array.h | 2 +- .../containers/juce_ElementComparator.h | 4 +-- modules/juce_core/containers/juce_HashMap.h | 2 +- .../containers/juce_NamedValueSet.cpp | 2 +- .../juce_core/containers/juce_OwnedArray.h | 6 ++-- .../containers/juce_ReferenceCountedArray.h | 2 +- modules/juce_core/containers/juce_SortedSet.h | 2 +- .../files/juce_DirectoryIterator.cpp | 2 +- modules/juce_core/files/juce_File.cpp | 12 +++---- modules/juce_core/files/juce_File.h | 4 +-- .../juce_core/files/juce_TemporaryFile.cpp | 4 +-- modules/juce_core/files/juce_TemporaryFile.h | 6 ++-- modules/juce_core/maths/juce_BigInteger.cpp | 6 ++-- modules/juce_core/maths/juce_Expression.cpp | 2 +- modules/juce_core/maths/juce_MathsFunctions.h | 10 +++--- modules/juce_core/memory/juce_HeapBlock.h | 4 +-- .../memory/juce_LeakedObjectDetector.h | 2 +- modules/juce_core/memory/juce_MemoryBlock.cpp | 2 +- .../memory/juce_ReferenceCountedObject.h | 2 +- modules/juce_core/memory/juce_Singleton.h | 4 +-- modules/juce_core/memory/juce_WeakReference.h | 2 +- .../native/juce_BasicNativeHeaders.h | 2 +- modules/juce_core/native/juce_Files_mac.mm | 2 +- .../juce_core/native/juce_Files_windows.cpp | 2 +- .../juce_core/native/juce_Network_android.cpp | 2 +- .../juce_core/native/juce_Network_windows.cpp | 2 +- .../juce_core/native/juce_SharedCode_posix.h | 16 ++++----- .../native/juce_SystemStats_linux.cpp | 1 - .../juce_core/native/juce_Threads_windows.cpp | 4 +-- modules/juce_core/network/juce_Socket.cpp | 2 +- modules/juce_core/network/juce_URL.cpp | 4 +-- .../streams/juce_MemoryOutputStream.cpp | 4 +-- .../juce_core/streams/juce_OutputStream.cpp | 2 +- modules/juce_core/system/juce_PlatformDefs.h | 8 ++--- .../juce_core/system/juce_StandardHeader.h | 4 +-- modules/juce_core/system/juce_SystemStats.h | 2 +- .../juce_core/text/juce_LocalisedStrings.cpp | 2 +- modules/juce_core/text/juce_String.cpp | 10 +++--- modules/juce_core/text/juce_String.h | 14 ++++---- .../juce_core/text/juce_StringPairArray.cpp | 2 +- .../juce_core/threads/juce_CriticalSection.h | 16 ++++----- .../juce_core/threads/juce_ReadWriteLock.cpp | 4 +-- modules/juce_core/threads/juce_ScopedLock.h | 12 +++---- .../juce_core/threads/juce_ScopedReadLock.h | 6 ++-- .../juce_core/threads/juce_ScopedWriteLock.h | 6 ++-- modules/juce_core/threads/juce_Thread.cpp | 2 +- modules/juce_core/threads/juce_ThreadPool.h | 4 +-- .../threads/juce_TimeSliceThread.cpp | 4 +-- modules/juce_core/time/juce_Time.cpp | 6 ++-- modules/juce_core/time/juce_Time.h | 4 +-- modules/juce_core/unit_tests/juce_UnitTest.h | 2 +- modules/juce_core/xml/juce_XmlDocument.cpp | 16 ++++----- modules/juce_core/xml/juce_XmlDocument.h | 4 +-- modules/juce_core/xml/juce_XmlElement.cpp | 4 +-- modules/juce_core/xml/juce_XmlElement.h | 22 ++++++------ .../zip/juce_GZIPDecompressorInputStream.cpp | 2 +- modules/juce_core/zip/juce_ZipFile.cpp | 4 +-- .../encryption/juce_RSAKey.cpp | 4 +-- .../encryption/juce_RSAKey.h | 2 +- .../juce_cryptography/hashing/juce_MD5.cpp | 2 +- .../juce_cryptography/hashing/juce_SHA256.cpp | 4 +-- .../app_properties/juce_PropertiesFile.cpp | 12 +++---- .../app_properties/juce_PropertiesFile.h | 2 +- .../values/juce_ValueTree.cpp | 4 +-- .../values/juce_ValueTree.h | 2 +- .../messages/juce_ApplicationBase.cpp | 10 +++--- .../messages/juce_DeletedAtShutdown.cpp | 2 +- .../messages/juce_MessageManager.h | 14 ++++---- .../native/juce_MessageManager_ios.mm | 2 +- .../native/juce_MessageManager_mac.mm | 2 +- .../native/juce_Messaging_windows.cpp | 2 +- modules/juce_events/timers/juce_Timer.cpp | 2 +- .../geometry/juce_AffineTransform.cpp | 2 +- .../juce_graphics/geometry/juce_EdgeTable.cpp | 2 +- .../juce_graphics/geometry/juce_EdgeTable.h | 6 ++-- modules/juce_graphics/geometry/juce_Path.cpp | 4 +-- modules/juce_graphics/geometry/juce_Path.h | 6 ++-- .../geometry/juce_PathStrokeType.cpp | 2 +- .../geometry/juce_RectangleList.h | 2 +- .../image_formats/juce_PNGLoader.cpp | 6 ++-- modules/juce_graphics/images/juce_Image.h | 4 +-- .../juce_graphics/images/juce_ImageCache.cpp | 2 +- .../native/juce_CoreGraphicsContext_mac.mm | 2 +- .../native/juce_RenderingHelpers.h | 14 ++++---- .../juce_gui_basics/buttons/juce_Button.cpp | 2 +- .../buttons/juce_DrawableButton.cpp | 2 +- .../juce_ApplicationCommandManager.cpp | 4 +-- .../juce_ApplicationCommandTarget.cpp | 2 +- .../commands/juce_KeyPressMappingSet.h | 2 +- .../components/juce_Component.cpp | 22 ++++++------ .../components/juce_ModalComponentManager.h | 4 +-- .../detail/juce_MouseInputSourceImpl.h | 2 +- .../detail/juce_MouseInputSourceList.h | 2 +- .../drawables/juce_SVGParser.cpp | 4 +-- .../filebrowser/juce_FileBrowserComponent.cpp | 4 +-- .../filebrowser/juce_FileChooser.cpp | 2 +- .../keyboard/juce_KeyPress.cpp | 4 +-- .../keyboard/juce_SystemClipboard.h | 2 +- .../layout/juce_ComponentAnimator.cpp | 2 +- .../juce_ComponentBoundsConstrainer.cpp | 2 +- .../layout/juce_ComponentBuilder.cpp | 4 +-- .../layout/juce_ComponentMovementWatcher.cpp | 2 +- .../layout/juce_StretchableLayoutManager.cpp | 10 +++--- .../layout/juce_StretchableObjectResizer.cpp | 2 +- .../layout/juce_TabbedButtonBar.cpp | 2 +- .../juce_gui_basics/layout/juce_Viewport.cpp | 4 +-- .../lookandfeel/juce_LookAndFeel.cpp | 2 +- .../lookandfeel/juce_LookAndFeel_V2.cpp | 6 ++-- .../lookandfeel/juce_LookAndFeel_V4.cpp | 2 +- .../juce_gui_basics/menus/juce_PopupMenu.cpp | 6 ++-- .../misc/juce_BubbleComponent.cpp | 2 +- .../misc/juce_DropShadower.cpp | 2 +- .../mouse/juce_DragAndDropContainer.cpp | 4 +-- .../mouse/juce_LassoComponent.h | 2 +- .../native/juce_ContentSharer_android.cpp | 2 +- .../native/juce_FileChooser_linux.cpp | 2 +- .../native/juce_MainMenu_mac.mm | 2 +- .../native/juce_NSViewComponentPeer_mac.mm | 12 +++---- .../native/juce_UIViewComponentPeer_ios.mm | 4 +-- .../native/juce_Windowing_android.cpp | 2 +- .../native/juce_Windowing_linux.cpp | 4 +-- .../native/juce_Windowing_windows.cpp | 22 ++++++------ .../native/juce_XWindowSystem_linux.cpp | 16 ++++----- .../positioning/juce_RelativeCoordinate.h | 4 +-- .../juce_RelativeCoordinatePositioner.cpp | 4 +-- .../properties/juce_PropertyPanel.cpp | 2 +- .../juce_gui_basics/widgets/juce_ComboBox.cpp | 4 +-- .../juce_gui_basics/widgets/juce_ListBox.cpp | 2 +- .../juce_gui_basics/widgets/juce_Slider.cpp | 10 +++--- .../widgets/juce_TableHeaderComponent.cpp | 4 +-- .../juce_gui_basics/widgets/juce_TreeView.cpp | 10 +++--- .../juce_gui_basics/widgets/juce_TreeView.h | 8 ++--- .../windows/juce_CallOutBox.cpp | 2 +- .../windows/juce_ComponentPeer.cpp | 4 +-- .../windows/juce_DocumentWindow.cpp | 2 +- .../windows/juce_ResizableWindow.cpp | 8 ++--- .../windows/juce_ThreadWithProgressWindow.cpp | 2 +- .../windows/juce_ThreadWithProgressWindow.h | 4 +-- .../windows/juce_TooltipWindow.cpp | 4 +-- .../windows/juce_TopLevelWindow.cpp | 2 +- .../code_editor/juce_CodeDocument.cpp | 8 ++--- .../documents/juce_FileBasedDocument.h | 4 +-- .../misc/juce_KeyMappingEditorComponent.cpp | 4 +-- .../misc/juce_LiveConstantEditor.cpp | 2 +- .../juce_gui_extra/misc/juce_SplashScreen.h | 4 +-- .../native/juce_ActiveXComponent_windows.cpp | 4 +-- .../native/juce_NSViewComponent_mac.mm | 2 +- .../native/juce_UIViewComponent_ios.mm | 2 +- .../native/juce_WebBrowserComponent_mac.mm | 2 +- .../juce_WebBrowserComponent_windows.cpp | 4 +-- .../juce_opengl/native/juce_OpenGL_windows.h | 4 +-- .../opengl/juce_OpenGLFrameBuffer.cpp | 2 +- .../opengl/juce_OpenGLGraphicsContext.cpp | 4 +-- .../juce_opengl/opengl/juce_OpenGLHelpers.cpp | 4 +-- .../juce_opengl/opengl/juce_OpenGLRenderer.h | 2 +- .../opengl/juce_OpenGLShaderProgram.h | 2 +- modules/juce_osc/osc/juce_OSCAddress.cpp | 8 ++--- modules/juce_osc/osc/juce_OSCReceiver.cpp | 8 ++--- modules/juce_osc/osc/juce_OSCTimeTag.cpp | 2 +- .../playback/juce_VideoComponent.cpp | 2 +- 209 files changed, 508 insertions(+), 509 deletions(-) diff --git a/extras/BinaryBuilder/Source/Main.cpp b/extras/BinaryBuilder/Source/Main.cpp index 709df829df..de7fa7bfec 100644 --- a/extras/BinaryBuilder/Source/Main.cpp +++ b/extras/BinaryBuilder/Source/Main.cpp @@ -199,7 +199,7 @@ int main (int argc, char* argv[]) { const File file (files[i]); - // (avoid source control files and hidden files..) + // avoid source control files and hidden files if (! isHiddenFile (file, sourceDirectory)) { if (file.getParentDirectory() != sourceDirectory) diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp index 192019ac77..074e78e190 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.cpp @@ -508,12 +508,12 @@ public: unitTest.expect (! clippingFailed); } - // convert data from the source to dest format.. + // convert data from the source to dest format... std::unique_ptr conv (new AudioData::ConverterInstance, AudioData::Pointer>()); conv->convertSamples (inPlace ? reversed : converted, original, numSamples); - // ..and back again.. + // ...and back again conv.reset (new AudioData::ConverterInstance, AudioData::Pointer>()); if (! inPlace) diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h index a63ac17564..3a204f6890 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h @@ -74,7 +74,7 @@ public: // These types can be used as the Constness template parameter for the AudioData::Pointer class. class NonConst; /**< Used as a template parameter for AudioData::Pointer. Indicates that the pointer can be used for non-const data. */ - class Const; /**< Used as a template parameter for AudioData::Pointer. Indicates that the samples can only be used for const data.. */ + class Const; /**< Used as a template parameter for AudioData::Pointer. Indicates that the samples can only be used for const data. */ //============================================================================== @@ -342,17 +342,17 @@ public: This object can be used to read and write from blocks of encoded audio samples. To create one, you specify the audio format as a series of template parameters, e.g. @code - // this creates a pointer for reading from a const array of 16-bit little-endian packed samples. + // this creates a pointer for reading from a const array of 16-bit little-endian packed samples AudioData::Pointer pointer (someRawAudioData); - // These methods read the sample that is being pointed to + // these methods read the sample that is being pointed to float firstSampleAsFloat = pointer.getAsFloat(); int32 firstSampleAsInt = pointer.getAsInt32(); - ++pointer; // moves the pointer to the next sample. - pointer += 3; // skips the next 3 samples. + ++pointer; // moves the pointer to the next sample + pointer += 3; // skips the next 3 samples @endcode The convertSamples() method lets you copy a range of samples from one format to another, automatically @@ -488,7 +488,7 @@ public: ++source; } } - else // copy backwards if we're increasing the sample width.. + else // copy backwards if we're increasing the sample width { dest += numSamples; source += numSamples; diff --git a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp index 530a880f3a..21b5d80dec 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessage.cpp +++ b/modules/juce_audio_basics/midi/juce_MidiMessage.cpp @@ -145,7 +145,7 @@ MidiMessage::MidiMessage (const void* const d, const int dataSize, const double : timeStamp (t), size (dataSize) { jassert (dataSize > 0); - // this checks that the length matches the data.. + // this checks that the length matches the data jassert (dataSize > 3 || *(uint8*)d >= 0xf0 || getMessageLengthFromFirstByte (*(uint8*)d) == size); memcpy (allocateSpace (dataSize), d, (size_t) dataSize); @@ -156,7 +156,7 @@ MidiMessage::MidiMessage (const int byte1, const double t) noexcept { packedData.asBytes[0] = (uint8) byte1; - // check that the length matches the data.. + // check that the length matches the data jassert (byte1 >= 0xf0 || getMessageLengthFromFirstByte ((uint8) byte1) == 1); } @@ -166,7 +166,7 @@ MidiMessage::MidiMessage (const int byte1, const int byte2, const double t) noex packedData.asBytes[0] = (uint8) byte1; packedData.asBytes[1] = (uint8) byte2; - // check that the length matches the data.. + // check that the length matches the data jassert (byte1 >= 0xf0 || getMessageLengthFromFirstByte ((uint8) byte1) == 2); } @@ -177,7 +177,7 @@ MidiMessage::MidiMessage (const int byte1, const int byte2, const int byte3, con packedData.asBytes[1] = (uint8) byte2; packedData.asBytes[2] = (uint8) byte3; - // check that the length matches the data.. + // check that the length matches the data jassert (byte1 >= 0xf0 || getMessageLengthFromFirstByte ((uint8) byte1) == 3); } diff --git a/modules/juce_audio_basics/midi/juce_MidiMessage.h b/modules/juce_audio_basics/midi/juce_MidiMessage.h index 65a118edb0..bd0586f2c6 100644 --- a/modules/juce_audio_basics/midi/juce_MidiMessage.h +++ b/modules/juce_audio_basics/midi/juce_MidiMessage.h @@ -78,7 +78,7 @@ public: template MidiMessage (int byte1, int byte2, int byte3, Data... otherBytes) : size (3 + sizeof... (otherBytes)) { - // this checks that the length matches the data.. + // this checks that the length matches the data jassert (size > 3 || byte1 >= 0xf0 || getMessageLengthFromFirstByte ((uint8) byte1) == size); const uint8 data[] = { (uint8) byte1, (uint8) byte2, (uint8) byte3, static_cast (otherBytes)... }; diff --git a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp index 4b8280b438..f097b3f0d1 100644 --- a/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPEInstrument.cpp @@ -991,7 +991,7 @@ public: expectNote (test.getNote (3, 2), 100, 0, 8192, 64, MPENote::keyDown); } { - // pathological case: second note-on for same note should retrigger it. + // pathological case: second note-on for same note should retrigger it UnitTestInstrument test; test.setZoneLayout (testLayout); test.noteOn (3, 0, MPEValue::from7BitInt (100)); @@ -1037,7 +1037,7 @@ public: test.noteOn (3, 60, MPEValue::from7BitInt (100)); // note in lower zone test.noteOn (10, 60, MPEValue::from7BitInt (100)); // note in upper zone - // sustain pedal on per-note channel shouldn't do anything. + // sustain pedal on per-note channel shouldn't do anything test.sustainPedal (3, true); expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDown); @@ -1045,13 +1045,13 @@ public: expectNote (test.getNote (10, 60), 100, 0, 8192, 64, MPENote::keyDown); expectEquals (test.noteKeyStateChangedCallCounter, 0); - // sustain pedal on non-zone channel shouldn't do anything either. + // sustain pedal on non-zone channel shouldn't do anything either test.sustainPedal (7, true); expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDown); expectNote (test.getNote (10, 60), 100, 0, 8192, 64, MPENote::keyDown); expectEquals (test.noteKeyStateChangedCallCounter, 0); - // sustain pedal on master channel should sustain notes on _that_ zone. + // sustain pedal on master channel should sustain notes on _that_ zone test.sustainPedal (1, true); expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDownAndSustained); expectNote (test.getNote (10, 60), 100, 0, 8192, 64, MPENote::keyDown); @@ -1100,19 +1100,19 @@ public: test.noteOn (3, 60, MPEValue::from7BitInt (100)); // note in lower zone test.noteOn (10, 60, MPEValue::from7BitInt (100)); // note in upper zone - // sostenuto pedal on per-note channel shouldn't do anything. + // sostenuto pedal on per-note channel shouldn't do anything test.sostenutoPedal (3, true); expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDown); expectNote (test.getNote (10, 60), 100, 0, 8192, 64, MPENote::keyDown); expectEquals (test.noteKeyStateChangedCallCounter, 0); - // sostenuto pedal on non-zone channel shouldn't do anything either. + // sostenuto pedal on non-zone channel shouldn't do anything either test.sostenutoPedal (9, true); expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDown); expectNote (test.getNote (10, 60), 100, 0, 8192, 64, MPENote::keyDown); expectEquals (test.noteKeyStateChangedCallCounter, 0); - // sostenuto pedal on master channel should sustain notes on *that* zone. + // sostenuto pedal on master channel should sustain notes on *that* zone test.sostenutoPedal (1, true); expectNote (test.getNote (3, 60), 100, 0, 8192, 64, MPENote::keyDownAndSustained); expectNote (test.getNote (10, 60), 100, 0, 8192, 64, MPENote::keyDown); @@ -1195,7 +1195,7 @@ public: MPEValue::centreValue(), MPEValue::centreValue()); { - // case 1: the note to exclude is not the most recent one. + // case 1: the note to exclude is not the most recent one MPEInstrument test; test.setZoneLayout (testLayout); @@ -1210,7 +1210,7 @@ public: expect (test.getMostRecentNoteOtherThan (testNote).initialNote == 61); } { - // case 2: the note to exclude is the most recent one. + // case 2: the note to exclude is the most recent one MPEInstrument test; test.setZoneLayout (testLayout); @@ -1373,7 +1373,7 @@ public: expectNote (test.getNote (10, 60), 100, 0, 8192, 64, MPENote::keyDown); expectEquals (test.notePitchbendChangedCallCounter, 3); - // applying pitchbend on an unrelated channel should do nothing. + // applying pitchbend on an unrelated channel should do nothing test.pitchbend (8, MPEValue::from14BitInt (3333)); expectNote (test.getNote (3, 60), 100, 0, 1111, 64, MPENote::keyDown); expectNote (test.getNote (4, 60), 100, 0, 8192, 64, MPENote::keyDown); @@ -1442,7 +1442,7 @@ public: // - release the note // - press same note again without sending a pitchbend or timbre message before the note-on // - the note should be turned on with a default value for pitchbend/timbre, - // and *not* the last value received on channel. + // and *not* the last value received on channel test.noteOn (3, 60, MPEValue::from7BitInt (100)); test.pitchbend (3, MPEValue::from14BitInt (5555)); @@ -1938,15 +1938,15 @@ public: test.noteOn (15, 63, MPEValue::from7BitInt (100)); expectEquals (test.getNumPlayingNotes(), 4); - // on note channel: ignore. + // on note channel: ignore test.processNextMidiEvent (MidiMessage::allControllersOff (3)); expectEquals (test.getNumPlayingNotes(), 4); - // on unused channel: ignore. + // on unused channel: ignore test.processNextMidiEvent (MidiMessage::allControllersOff (9)); expectEquals (test.getNumPlayingNotes(), 4); - // on master channel: release notes in that zone only. + // on master channel: release notes in that zone only test.processNextMidiEvent (MidiMessage::allControllersOff (1)); expectEquals (test.getNumPlayingNotes(), 2); test.processNextMidiEvent (MidiMessage::allControllersOff (16)); @@ -2136,7 +2136,7 @@ public: } } { - // custom pitchbend range in legacy mode. + // custom pitchbend range in legacy mode UnitTestInstrument test; test.enableLegacyMode (11); @@ -2145,7 +2145,7 @@ public: expectDoubleWithinRelativeError (test.getMostRecentNote (1).totalPitchbendInSemitones, -5.5, 0.01); } { - // sustain pedal should be per channel in legacy mode. + // sustain pedal should be per channel in legacy mode UnitTestInstrument test; test.enableLegacyMode(); @@ -2168,7 +2168,7 @@ public: } { - // sostenuto pedal should be per channel in legacy mode. + // sostenuto pedal should be per channel in legacy mode UnitTestInstrument test; test.enableLegacyMode(); diff --git a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp index 7663bf94ad..f3b8419dae 100644 --- a/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp +++ b/modules/juce_audio_basics/mpe/juce_MPESynthesiser.cpp @@ -211,7 +211,7 @@ MPESynthesiserVoice* MPESynthesiser::findVoiceToSteal (MPENote noteToStealVoiceF usableVoicesToStealArray.add (voice); // NB: Using a functor rather than a lambda here due to scare-stories about - // compilers generating code containing heap allocations.. + // compilers generating code containing heap allocations. struct Sorter { bool operator() (const MPESynthesiserVoice* a, const MPESynthesiserVoice* b) const noexcept { return a->noteOnTime < b->noteOnTime; } @@ -334,7 +334,7 @@ void MPESynthesiser::turnOffAllVoices (bool allowTailOff) } } - // finally make sure the MPE Instrument also doesn't have any notes anymore. + // finally make sure the MPE Instrument also doesn't have any notes anymore instrument.releaseAllNotes(); } diff --git a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp index 1a7a0ee8a8..333514f4c4 100644 --- a/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_BufferingAudioSource.cpp @@ -50,7 +50,7 @@ BufferingAudioSource::BufferingAudioSource (PositionableAudioSource* s, jassert (source != nullptr); jassert (numberOfSamplesToBuffer > 1024); // not much point using this class if you're - // not using a larger buffer.. + // not using a larger buffer } BufferingAudioSource::~BufferingAudioSource() diff --git a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp index a2796e89d0..62c9c83195 100644 --- a/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp +++ b/modules/juce_audio_basics/sources/juce_ResamplingAudioSource.cpp @@ -134,7 +134,7 @@ void ResamplingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& inf if (localRatio > 1.0001) { - // for down-sampling, pre-apply the filter.. + // for down-sampling, pre-apply the filter for (int i = channelsToProcess; --i >= 0;) applyFilter (buffer.getWritePointer (i, endOfBufferPos), numToDo, filterStates[i]); @@ -178,7 +178,7 @@ void ResamplingAudioSource::getNextAudioBlock (const AudioSourceChannelInfo& inf if (localRatio < 0.9999) { - // for up-sampling, apply the filter after transposing.. + // for up-sampling, apply the filter after transposing for (int i = channelsToProcess; --i >= 0;) applyFilter (info.buffer->getWritePointer (i, info.startSample), info.numSamples, filterStates[i]); } diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp index 87a40b993a..80da2a4869 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.cpp @@ -553,7 +553,7 @@ SynthesiserVoice* Synthesiser::findVoiceToSteal (SynthesiserSound* soundToPlay, usableVoicesToStealArray.add (voice); // NB: Using a functor rather than a lambda here due to scare-stories about - // compilers generating code containing heap allocations.. + // compilers generating code containing heap allocations. struct Sorter { bool operator() (const SynthesiserVoice* a, const SynthesiserVoice* b) const noexcept { return a->wasStartedBefore (*b); } @@ -578,7 +578,7 @@ SynthesiserVoice* Synthesiser::findVoiceToSteal (SynthesiserSound* soundToPlay, if (top == low) top = nullptr; - // The oldest note that's playing with the target pitch is ideal.. + // The oldest note that's playing with the target pitch is ideal. for (auto* voice : usableVoicesToStealArray) if (voice->getCurrentlyPlayingNote() == midiNoteNumber) return voice; diff --git a/modules/juce_audio_basics/utilities/juce_Decibels.h b/modules/juce_audio_basics/utilities/juce_Decibels.h index 1b3cc9599c..70b00ad471 100644 --- a/modules/juce_audio_basics/utilities/juce_Decibels.h +++ b/modules/juce_audio_basics/utilities/juce_Decibels.h @@ -132,7 +132,7 @@ private: //============================================================================== enum { defaultMinusInfinitydB = -100 }; - Decibels() = delete; // This class can't be instantiated, it's just a holder for static methods.. + Decibels() = delete; // This class can't be instantiated, it's just a holder for static methods. }; } // namespace juce diff --git a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp index a08901b4e5..a3a0ae3518 100644 --- a/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp +++ b/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp @@ -1350,7 +1350,7 @@ double AudioDeviceManager::LevelMeter::getCurrentLevel() const noexcept void AudioDeviceManager::playTestSound() { - { // cunningly nested to swap, unlock and delete in that order. + { // cunningly nested to swap, unlock and delete in that order std::unique_ptr> oldSound; { diff --git a/modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp b/modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp index 7444e93778..9500aa8719 100644 --- a/modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp +++ b/modules/juce_audio_devices/midi_io/juce_MidiMessageCollector.cpp @@ -105,7 +105,7 @@ void MidiMessageCollector::removeNextBlockOfMessages (MidiBuffer& destBuffer, if (numSourceSamples > numSamples) { // if our list of events is longer than the buffer we're being - // asked for, scale them down to squeeze them all in.. + // asked for, scale them down to squeeze them all in const int maxBlockLengthToUse = numSamples << 5; auto iter = incomingMessages.cbegin(); diff --git a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp index 7802df63bc..7de61f823f 100644 --- a/modules/juce_audio_devices/native/juce_ALSA_linux.cpp +++ b/modules/juce_audio_devices/native/juce_ALSA_linux.cpp @@ -220,7 +220,7 @@ public: return false; } - if (snd_pcm_hw_params_set_access (handle, hwParams, SND_PCM_ACCESS_RW_INTERLEAVED) >= 0) // works better for plughw.. + if (snd_pcm_hw_params_set_access (handle, hwParams, SND_PCM_ACCESS_RW_INTERLEAVED) >= 0) // works better for plughw isInterleaved = true; else if (snd_pcm_hw_params_set_access (handle, hwParams, SND_PCM_ACCESS_RW_NONINTERLEAVED) >= 0) isInterleaved = false; @@ -286,7 +286,7 @@ public: || JUCE_ALSA_FAILED (snd_pcm_hw_params_get_periods (hwParams, &periods, &dir))) latency = 0; else - latency = (int) frames * ((int) periods - 1); // (this is the method JACK uses to guess the latency..) + latency = (int) frames * ((int) periods - 1); // (this is the method JACK uses to guess the latency) JUCE_ALSA_LOG ("frames: " << (int) frames << ", periods: " << (int) periods << ", samplesPerPeriod: " << (int) samplesPerPeriod); @@ -551,7 +551,7 @@ public: currentOutputChans.clear(); // Note that the input device is opened before an output, because we've heard - // of drivers where doing it in the reverse order mysteriously fails.. If this + // of drivers where doing it in the reverse order mysteriously fails. If this // order also causes problems, let us know and we'll see if we can find a compromise! if (inputChannelDataForCallback.size() > 0 && inputId.isNotEmpty()) @@ -660,7 +660,7 @@ public: if ((! waitForThreadToExit (400)) && audioIoInProgress && numCallbacks == callbacksToStop) { - JUCE_ALSA_LOG ("Thread is stuck in i/o.. Is pulseaudio suspended?"); + JUCE_ALSA_LOG ("Thread is stuck in i/o. Is pulseaudio suspended?"); if (outputDevice != nullptr) outputDevice->closeNow(); if (inputDevice != nullptr) inputDevice->closeNow(); @@ -1240,7 +1240,7 @@ private: bool isInput = (ioid != "Output"); // alsa is stupid here, it advertises dmix and dsnoop as input/output devices, but - // opening dmix as input, or dsnoop as output will trigger errors.. + // opening dmix as input, or dsnoop as output will trigger errors isInput = isInput && ! id.startsWith ("dmix"); isOutput = isOutput && ! id.startsWith ("dsnoop"); diff --git a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp index 90c098502c..e008a3188c 100644 --- a/modules/juce_audio_devices/native/juce_ASIO_windows.cpp +++ b/modules/juce_audio_devices/native/juce_ASIO_windows.cpp @@ -119,7 +119,7 @@ struct ASIOSampleFormat case ASIOSTDSDInt8NER8: break; // (unhandled) default: - jassertfalse; // (not a valid format code..) + jassertfalse; // (not a valid format code) break; } } @@ -357,7 +357,7 @@ public: void updateSampleRates() { - // find a list of sample rates.. + // find a list of sample rates Array newRates; if (asioObject != nullptr) @@ -586,7 +586,7 @@ public: if (! calledback) { error = "Device didn't start correctly"; - JUCE_ASIO_LOG ("no callbacks - stopping.."); + JUCE_ASIO_LOG ("no callbacks - stopping"); asioObject->stop(); } } @@ -862,7 +862,7 @@ private: if (shouldUsePreferredSize) { - JUCE_ASIO_LOG ("Using preferred size for buffer.."); + JUCE_ASIO_LOG ("using preferred size for buffer"); auto err = refreshBufferSizes(); if (err == ASE_OK) @@ -919,7 +919,7 @@ private: void addBufferSizes (long minSize, long maxSize, long preferredSize, long granularity) { - // find a list of buffer sizes.. + // find a list of buffer sizes JUCE_ASIO_LOG (String ((int) minSize) + "->" + String ((int) maxSize) + ", " + String ((int) preferredSize) + ", " + String ((int) granularity)); @@ -964,7 +964,7 @@ private: if (err == ASE_NoClock && numClockSources > 0) { - JUCE_ASIO_LOG ("trying to set a clock source.."); + JUCE_ASIO_LOG ("trying to set a clock source"); err = asioObject->setClockSource (clocks[0].index); JUCE_ASIO_LOG_ERROR ("setClockSource2", err); Thread::sleep (10); @@ -976,7 +976,7 @@ private: if (err == 0) currentSampleRate = newRate; - // on fail, ignore the attempt to change rate, and run with the current one.. + // on fail, ignore the attempt to change rate, and run with the current one } } @@ -1170,7 +1170,7 @@ private: if (driverError.isEmpty()) { char buffer[512] = {}; - asioObject->getDriverName (buffer); // just in case any flimsy drivers expect this to be called.. + asioObject->getDriverName (buffer); // just in case any flimsy drivers expect this to be called } return driverError; @@ -1178,7 +1178,7 @@ private: String openDevice() { - // open the device and get its info.. + // open the device and get its info JUCE_ASIO_LOG ("opening device: " + getName()); needToReset = false; @@ -1241,11 +1241,11 @@ private: JUCE_ASIO_LOG ("outputReady true"); updateSampleRates(); - readLatencies(); // ..doing these steps because cubase does so at this stage - createDummyBuffers (preferredBufferSize); // in initialisation, and some devices fail if we don't. + readLatencies(); // doing these steps because cubase does so at this stage + createDummyBuffers (preferredBufferSize); // in initialisation, and some devices fail if we don't readLatencies(); - // start and stop because cubase does it.. + // start and stop because cubase does it err = asioObject->start(); // ignore an error here, as it might start later after setting other stuff up JUCE_ASIO_LOG_ERROR ("start", err); @@ -1485,7 +1485,7 @@ public: for (int i = deviceNames.size(); --i >= 0;) if (deviceNames[i].containsIgnoreCase ("asio4all")) - return i; // asio4all is a safe choice for a default.. + return i; // asio4all is a safe choice for a default #if JUCE_DEBUG if (deviceNames.size() > 1 && deviceNames[0].containsIgnoreCase ("digidesign")) @@ -1503,7 +1503,7 @@ public: return i; jassertfalse; // unfortunately you can only have a finite number - // of ASIO devices open at the same time.. + // of ASIO devices open at the same time return -1; } @@ -1579,7 +1579,7 @@ private: if (RegQueryValueEx (pathKey, 0, 0, &dtype, (LPBYTE) pathName, &dsize) == ERROR_SUCCESS) // In older code, this used to check for the existence of the file, but there are situations - // where our process doesn't have access to it, but where the driver still loads ok.. + // where our process doesn't have access to it, but where the driver still loads ok. ok = (pathName[0] != 0); RegCloseKey (pathKey); diff --git a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp index cb28286d55..2dae23c5d6 100644 --- a/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp +++ b/modules/juce_audio_devices/native/juce_CoreAudio_mac.cpp @@ -671,7 +671,7 @@ public: // Annoyingly, after changing the rate and buffer size, some devices fail to // correctly report their new settings until some random time in the future, so // after calling updateDetailsFromDevice, we need to manually bodge these values - // to make sure we're using the correct numbers.. + // to make sure we're using the correct numbers. updateDetailsFromDevice (ins, outs); sampleRate = newSampleRate; bufferSize = bufferSizeSamples; @@ -2298,7 +2298,7 @@ public: jassert (hasScanned); // need to call scanForDevices() before doing this // if they're asking for any input channels at all, use the default input, so we - // get the built-in mic rather than the built-in output with no inputs.. + // get the built-in mic rather than the built-in output with no inputs AudioObjectPropertyAddress pa; auto selector = forInput ? kAudioHardwarePropertyDefaultInputDevice diff --git a/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp b/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp index e1a4083861..3379df3779 100644 --- a/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp +++ b/modules/juce_audio_devices/native/juce_DirectSound_windows.cpp @@ -34,7 +34,7 @@ extern "C" { - // Declare just the minimum number of interfaces for the DSound objects that we need.. + // Declare just the minimum number of interfaces for the DSound objects that we need. struct DSBUFFERDESC { DWORD dwSize; @@ -857,7 +857,7 @@ public: { if (! isThreadRunning()) { - // something gone wrong and the thread's stopped.. + // something gone wrong and the thread's stopped isOpen_ = false; return; } @@ -1119,7 +1119,7 @@ String DSoundAudioIODevice::openDevice (const BigInteger& inputChannels, sampleRate = sampleRate_ > 0.0 ? sampleRate_ : 44100.0; if (bufferSizeSamples_ <= 0) - bufferSizeSamples_ = 960; // use as a default size if none is set. + bufferSizeSamples_ = 960; // use as a default size if none is set bufferSizeSamples = bufferSizeSamples_ & ~7; diff --git a/modules/juce_audio_devices/native/juce_OpenSL_android.cpp b/modules/juce_audio_devices/native/juce_OpenSL_android.cpp index 410dae8e70..9f71a97988 100644 --- a/modules/juce_audio_devices/native/juce_OpenSL_android.cpp +++ b/modules/juce_audio_devices/native/juce_OpenSL_android.cpp @@ -800,11 +800,11 @@ public: OpenSLAudioIODevice (const String& deviceName) : AudioIODevice (deviceName, openSLTypeName) { // OpenSL has piss-poor support for determining latency, so the only way I can find to - // get a number for this is by asking the AudioTrack/AudioRecord classes.. + // get a number for this is by asking the AudioTrack/AudioRecord classes. AndroidAudioIODevice javaDevice (deviceName); // this is a total guess about how to calculate the latency, but seems to vaguely agree - // with the devices I've tested.. YMMV + // with the devices I've tested. YMMV inputLatency = (javaDevice.minBufferSizeIn * 2) / 3; outputLatency = (javaDevice.minBufferSizeOut * 2) / 3; diff --git a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp index 34eb2e2e1a..5bdf112e77 100644 --- a/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp +++ b/modules/juce_audio_devices/native/juce_WASAPI_windows.cpp @@ -1474,7 +1474,7 @@ public: if (! isThreadRunning()) { - // something's gone wrong and the thread's stopped.. + // something's gone wrong and the thread's stopped flags &= ~flagOpen; return; } diff --git a/modules/juce_audio_devices/sources/juce_AudioSourcePlayer.cpp b/modules/juce_audio_devices/sources/juce_AudioSourcePlayer.cpp index 5474b8b877..8338c88fe9 100644 --- a/modules/juce_audio_devices/sources/juce_AudioSourcePlayer.cpp +++ b/modules/juce_audio_devices/sources/juce_AudioSourcePlayer.cpp @@ -85,7 +85,7 @@ void AudioSourcePlayer::audioDeviceIOCallbackWithContext (const float* const* in int numActiveChans = 0, numInputs = 0, numOutputs = 0; // messy stuff needed to compact the channels down into an array - // of non-zero pointers.. + // of non-zero pointers for (int i = 0; i < totalNumInputChannels; ++i) { if (inputChannelData[i] != nullptr) diff --git a/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp b/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp index d4cd074be0..e4798f2bd5 100644 --- a/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp +++ b/modules/juce_audio_devices/sources/juce_AudioTransportSource.cpp @@ -269,7 +269,7 @@ void AudioTransportSource::getNextAudioBlock (const AudioSourceChannelInfo& info if (! playing) { - // just stopped playing, so fade out the last block.. + // just stopped playing, so fade out the last block for (int i = info.buffer->getNumChannels(); --i >= 0;) info.buffer->applyGainRamp (i, info.startSample, jmin (256, info.numSamples), 1.0f, 0.0f); diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index c3d91799f6..38ac383bec 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -707,9 +707,9 @@ public: if (bytesWritten + bytes >= (size_t) 0xfff00000 || ! output->write (tempBlock.getData(), bytes)) { - // failed to write to disk, so let's try writing the header. + // Failed to write to disk, so let's try writing the header. // If it's just run out of disk space, then if it does manage - // to write the header, we'll still have a useable file.. + // to write the header, we'll still have a useable file. writeHeader(); writeFailed = true; return false; @@ -848,7 +848,7 @@ public: if (map == nullptr || ! mappedSection.contains (Range (startSampleInFile, startSampleInFile + numSamples))) { - jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read. + jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read return false; } @@ -870,7 +870,7 @@ public: if (map == nullptr || ! mappedSection.contains (sample)) { - jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read. + jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read zeromem (result, (size_t) num * sizeof (float)); return; @@ -913,7 +913,7 @@ public: if (map == nullptr || numSamples <= 0 || ! mappedSection.contains (Range (startSampleInFile, startSampleInFile + numSamples))) { - jassert (numSamples <= 0); // you must make sure that the window contains all the samples you're going to attempt to read. + jassert (numSamples <= 0); // you must make sure that the window contains all the samples you're going to attempt to read for (int i = 0; i < numChannelsToRead; ++i) results[i] = Range(); diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index 4703e3431a..0e55e339ec 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -222,7 +222,7 @@ public: if (lengthInSamples == 0 && sampleRate > 0) { // the length hasn't been stored in the metadata, so we'll need to - // work it out the length the hard way, by scanning the whole file.. + // work it out the length the hard way, by scanning the whole file scanningForLength = true; FLAC__stream_decoder_process_until_end_of_stream (decoder); scanningForLength = false; diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index e0f4d0ebe5..1f0e27d40f 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -327,7 +327,7 @@ public: { if (ok) { - // write a zero-length packet to show ogg that we're finished.. + // write a zero-length packet to show ogg that we're finished writeSamples (0); ogg_stream_clear (&os); diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index c4d34f043c..ce472b5681 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -1651,9 +1651,9 @@ public: if (! output->write (tempBlock.getData(), bytes)) { - // failed to write to disk, so let's try writing the header. + // Failed to write to disk, so let's try writing the header. // If it's just run out of disk space, then if it does manage - // to write the header, we'll still have a usable file.. + // to write the header, we'll still have a usable file. writeHeader(); writeFailed = true; return false; @@ -1890,7 +1890,7 @@ public: if (map == nullptr || ! mappedSection.contains (sample)) { - jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read. + jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read zeromem (result, (size_t) num * sizeof (float)); return; @@ -1917,7 +1917,7 @@ public: if (map == nullptr || numSamples <= 0 || ! mappedSection.contains (Range (startSampleInFile, startSampleInFile + numSamples))) { - jassert (numSamples <= 0); // you must make sure that the window contains all the samples you're going to attempt to read. + jassert (numSamples <= 0); // you must make sure that the window contains all the samples you're going to attempt to read for (int i = 0; i < numChannelsToRead; ++i) results[i] = {}; @@ -2090,7 +2090,7 @@ bool WavAudioFormat::replaceMetadataInFile (const File& wavFile, const StringPai if (chunk.getSize() <= (size_t) bwavSize) { - // the new one will fit in the space available, so write it directly.. + // the new one will fit in the space available, so write it directly auto oldSize = wavFile.getSize(); { diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h index 30306bc844..d745c9b467 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h @@ -67,7 +67,7 @@ public: This is the number of samples from the start of an edit that the file is supposed to begin at. Seems like an obvious mistake to only allow a file to occur in an edit once, but that's the way - it is.. + it is. @see AudioFormatReader::metadataValues, createWriterFor */ diff --git a/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp b/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp index 5d61027bc5..12f01901db 100644 --- a/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp +++ b/modules/juce_audio_formats/format/juce_AudioFormatReader.cpp @@ -188,7 +188,7 @@ bool AudioFormatReader::read (AudioBuffer* buffer, if (! read (chans, 2, readerStartSample, numSamples, true)) return false; - // if the target's stereo and the source is mono, dupe the first channel.. + // if the target's stereo and the source is mono, dupe the first channel if (numTargetChannels > 1 && (chans[0] == nullptr || chans[1] == nullptr) && (dests[0] != nullptr && dests[1] != nullptr)) @@ -439,7 +439,7 @@ void MemoryMappedAudioFormatReader::touchSample (int64 sample) const noexcept if (map != nullptr && mappedSection.contains (sample)) memoryReadDummyVariable += *(char*) sampleToPointer (sample); else - jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read. + jassertfalse; // you must make sure that the window contains all the samples you're going to attempt to read } } // namespace juce diff --git a/modules/juce_audio_formats/sampler/juce_Sampler.cpp b/modules/juce_audio_formats/sampler/juce_Sampler.cpp index 33a31cd407..55756fa893 100644 --- a/modules/juce_audio_formats/sampler/juce_Sampler.cpp +++ b/modules/juce_audio_formats/sampler/juce_Sampler.cpp @@ -140,7 +140,7 @@ void SamplerVoice::renderNextBlock (AudioBuffer& outputBuffer, int startS auto alpha = (float) (sourceSamplePosition - pos); auto invAlpha = 1.0f - alpha; - // just using a very simple linear interpolation here.. + // just using a very simple linear interpolation here float l = (inL[pos] * invAlpha + inL[pos + 1] * alpha); float r = (inR != nullptr) ? (inR[pos] * invAlpha + inR[pos + 1] * alpha) : l; diff --git a/modules/juce_audio_plugin_client/detail/juce_CheckSettingMacros.h b/modules/juce_audio_plugin_client/detail/juce_CheckSettingMacros.h index 50e0c64a0d..4051eff3ad 100644 --- a/modules/juce_audio_plugin_client/detail/juce_CheckSettingMacros.h +++ b/modules/juce_audio_plugin_client/detail/juce_CheckSettingMacros.h @@ -33,7 +33,7 @@ */ // The following checks should cause a compile error if you've forgotten to -// define all your plugin settings properly.. +// define all your plugin settings properly. #if ! (JucePlugin_Build_VST || JucePlugin_Build_VST3 \ || JucePlugin_Build_AU || JucePlugin_Build_AUv3 \ diff --git a/modules/juce_audio_plugin_client/detail/juce_VSTWindowUtilities.h b/modules/juce_audio_plugin_client/detail/juce_VSTWindowUtilities.h index 92a0d6acee..9777d4606e 100644 --- a/modules/juce_audio_plugin_client/detail/juce_VSTWindowUtilities.h +++ b/modules/juce_audio_plugin_client/detail/juce_VSTWindowUtilities.h @@ -58,7 +58,7 @@ struct VSTWindowUtilities : ComponentPeer::windowIgnoresKeyPresses; comp->addToDesktop (desktopFlags | defaultFlags, parentView); - // (this workaround is because Wavelab provides a zero-size parent view..) + // this workaround is because Wavelab provides a zero-size parent view if (approximatelyEqual ([parentView frame].size.height, 0.0)) [((NSView*) comp->getWindowHandle()) setFrameOrigin: NSZeroPoint]; 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 8cb4faa5c8..d754f32b72 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 @@ -931,7 +931,7 @@ namespace AAXClasses auto numObjects = dataSize / sizeof (PluginInstanceInfo); auto* objects = static_cast (data); - jassert (numObjects == 1); // not sure how to handle more than one.. + jassert (numObjects == 1); // not sure how to handle more than one for (size_t i = 0; i < numObjects; ++i) new (objects + i) PluginInstanceInfo (const_cast (*this)); 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 8f4f508a72..2e45c21992 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 @@ -1892,7 +1892,7 @@ public: if (activePlugins.size() + activeUIs.size() == 0) { // there's some kind of component currently modal, but the host - // is trying to delete our plugin.. + // is trying to delete our plugin jassert (ModalComponentManager::getInstanceWithoutCreating() == nullptr || Component::getCurrentlyModalComponent() == nullptr); } diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp b/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp index 01480ad4e9..8cb4d331a9 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_LV2.cpp @@ -1281,7 +1281,7 @@ private: // In the event that the plugin decides to send all of its parameters in one go, // we should ensure that the output buffer is large enough to accommodate, with some - // extra room for the sequence header, MIDI messages etc.. + // extra room for the sequence header, MIDI messages etc. const auto patchSetSizeBytes = 72; const auto additionalSize = 8192; const auto atomPortMinSize = proc.getParameters().size() * patchSetSizeBytes + additionalSize; 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 d45d14c94e..4657039959 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 @@ -454,10 +454,10 @@ public: } } - // if some output channels are disabled, some hosts supply the same buffer + // If some output channels are disabled, some hosts supply the same buffer // for multiple channels or supply a nullptr - this buggers up our method // of copying the inputs over the outputs, so we need to create unique temp - // buffers in this case.. + // buffers in this case. if (bufferPointerReusedForOtherChannels || chan == nullptr) { chan = new FloatType [(size_t) blockSize * 2]; @@ -491,7 +491,7 @@ public: processor->processBlock (chans, midiEvents); } - // copy back any temp channels that may have been used.. + // 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* dest = outputs[i]) @@ -863,8 +863,8 @@ public: editorComp = nullptr; - // there's some kind of component currently modal, but the host - // is trying to delete our plugin. You should try to avoid this happening.. + // There's some kind of component currently modal, but the host + // is trying to delete our plugin. You should try to avoid this happening. jassert (Component::getCurrentlyModalComponent() == nullptr); } } @@ -1084,7 +1084,7 @@ public: } } - // some hosts don't support the sizeWindow call, so do it manually.. + // some hosts don't support the sizeWindow call, so do it manually if (! sizeWasSuccessful) { const ScopedValueSetter resizingParentSetter (resizingParent, true); @@ -1354,7 +1354,7 @@ private: //============================================================================== #if JUCE_WINDOWS - // Workarounds for hosts which attempt to open editor windows on a non-GUI thread.. (Grrrr...) + // Workarounds for hosts which attempt to open editor windows on a non-GUI thread. (Grrrr...) static void checkWhetherMessageThreadIsCorrect() { auto host = detail::PluginUtilities::getHostType(); @@ -1498,7 +1498,7 @@ private: { if (auto* param = juceParameters.getParamForIndex (args.index)) { - // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. + // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more param->getLabel().copyToUTF8 ((char*) args.ptr, 24 + 1); } @@ -1509,7 +1509,7 @@ private: { if (auto* param = juceParameters.getParamForIndex (args.index)) { - // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. + // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more param->getCurrentValueAsText().copyToUTF8 ((char*) args.ptr, 24 + 1); } @@ -1520,7 +1520,7 @@ private: { if (auto* param = juceParameters.getParamForIndex (args.index)) { - // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more. + // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more param->getName (32).copyToUTF8 ((char*) args.ptr, 32 + 1); } @@ -2189,7 +2189,7 @@ namespace JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") //============================================================================== -// Mac startup code.. +// Mac startup code #if JUCE_MAC JUCE_EXPORTED_FUNCTION Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster); @@ -2205,7 +2205,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") } //============================================================================== -// Linux startup code.. +// Linux startup code #elif JUCE_LINUX || JUCE_BSD JUCE_EXPORTED_FUNCTION Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster); @@ -2225,7 +2225,7 @@ JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wmissing-prototypes") __attribute__ ((destructor)) void myPluginFini() {} //============================================================================== -// Win32 startup code.. +// Win32 startup code #else extern "C" __declspec (dllexport) Vst2::AEffect* VSTPluginMain (Vst2::audioMasterCallback audioMaster) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index f040b64e42..cede28f25c 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -177,7 +177,7 @@ private: } #if JUCE_MODAL_LOOPS_PERMITTED - // Unfortunately, Steinberg's docs explicitly say this should be modal.. + // Unfortunately, Steinberg's docs explicitly say this should be modal. handleResult (topLevelMenu->showMenu (options)); #else topLevelMenu->showMenuAsync (options, diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index ff8070bf41..123a51eade 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -479,7 +479,7 @@ private: if ((rw > 50 && rh > 50 && rw < 2000 && rh < 2000 && (! isWithin (w, rw, 2) || ! isWithin (h, rh, 2))) || ((w == 0 && rw > 0) || (h == 0 && rh > 0))) { - // very dodgy logic to decide which size is right. + // very dodgy logic to decide which size is right if (std::abs (rw - w) > 350 || std::abs (rh - h) > 350) { ScopedThreadDPIAwarenessSetter threadDpiAwarenessSetter { pluginHWND }; @@ -604,7 +604,7 @@ private: resizeToFit(); } - // hooks to get keyboard events from VST windows. + // hooks to get keyboard events from VST windows static LRESULT CALLBACK vstHookWndProc (HWND hW, UINT message, WPARAM wParam, LPARAM lParam) { for (int i = activeVSTWindows.size(); --i >= 0;) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp index 61072fec76..0ffb757521 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.cpp @@ -42,7 +42,7 @@ AudioProcessorEditor::AudioProcessorEditor (AudioProcessor& p) noexcept : proce AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* p) noexcept : processor (*p) { - // the filter must be valid.. + // the filter must be valid jassert (p != nullptr); initialise(); } @@ -50,7 +50,7 @@ AudioProcessorEditor::AudioProcessorEditor (AudioProcessor* p) noexcept : proce AudioProcessorEditor::~AudioProcessorEditor() { // if this fails, then the wrapper hasn't called editorBeingDeleted() on the - // filter for some reason.. + // filter for some reason jassert (processor.getActiveEditor() != this); removeComponentListener (resizeListener.get()); } @@ -91,7 +91,7 @@ void AudioProcessorEditor::setResizeLimits (int newMinimumWidth, { if (constrainer != nullptr && constrainer != &defaultConstrainer) { - // if you've set up a custom constrainer then these settings won't have any effect.. + // if you've set up a custom constrainer then these settings won't have any effect jassertfalse; return; } diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp index 6e21a28b52..035583c91b 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp @@ -103,7 +103,7 @@ bool KnownPluginList::addType (const PluginDescription& type) { if (desc.isDuplicateOf (type)) { - // strange - found a duplicate plugin with different info.. + // strange - found a duplicate plugin with different info jassert (desc.name == type.name); jassert (desc.isInstrument == type.isInstrument); @@ -489,7 +489,7 @@ struct PluginTreeUtils { #if JUCE_MAC if (path.containsChar (':')) - path = path.fromFirstOccurrenceOf (":", false, false); // avoid the special AU formatting nonsense on Mac.. + path = path.fromFirstOccurrenceOf (":", false, false); // avoid the special AU formatting nonsense on Mac #endif if (path.isEmpty()) diff --git a/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.cpp b/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.cpp index e61d60b163..5d5185d00b 100644 --- a/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.cpp +++ b/modules/juce_audio_processors/scanning/juce_PluginDirectoryScanner.cpp @@ -69,7 +69,7 @@ void PluginDirectoryScanner::setFilesOrIdentifiersToScan (const StringArray& fil filesOrIdentifiersToScan = filesOrIdentifiers; // If any plugins have crashed recently when being loaded, move them to the - // end of the list to give the others a chance to load correctly.. + // end of the list to give the others a chance to load correctly. for (auto& crashed : readDeadMansPedalFile (deadMansPedalFile)) for (int j = filesOrIdentifiersToScan.size(); --j >= 0;) if (crashed == filesOrIdentifiersToScan[j]) @@ -112,7 +112,7 @@ bool PluginDirectoryScanner::scanNextFile (bool dontRescanIfAlreadyInList, list.scanAndAddFile (file, dontRescanIfAlreadyInList, typesFound, format); - // Managed to load without crashing, so remove it from the dead-man's-pedal.. + // Managed to load without crashing, so remove it from the dead-man's-pedal. crashedPlugins.removeString (file); setDeadMansPedalFile (crashedPlugins); @@ -140,7 +140,7 @@ void PluginDirectoryScanner::setDeadMansPedalFile (const StringArray& newContent void PluginDirectoryScanner::applyBlacklistingsFromDeadMansPedal (KnownPluginList& list, const File& file) { // If any plugins have crashed recently when being loaded, move them to the - // end of the list to give the others a chance to load correctly.. + // end of the list to give the others a chance to load correctly. for (auto& crashedPlugin : readDeadMansPedalFile (file)) list.addToBlacklist (crashedPlugin); } diff --git a/modules/juce_audio_processors_headless/format_types/juce_AU_Shared.h b/modules/juce_audio_processors_headless/format_types/juce_AU_Shared.h index 28b3cee3dd..26461eaaba 100644 --- a/modules/juce_audio_processors_headless/format_types/juce_AU_Shared.h +++ b/modules/juce_audio_processors_headless/format_types/juce_AU_Shared.h @@ -35,7 +35,7 @@ #pragma once /** @cond */ -// This macro can be set if you need to override this internal name for some reason.. +// This macro can be set if you need to override this internal name for some reason. #ifndef JUCE_STATE_DICTIONARY_KEY #define JUCE_STATE_DICTIONARY_KEY "jucePluginState" #endif diff --git a/modules/juce_audio_processors_headless/format_types/juce_AudioUnitPluginFormatImpl.h b/modules/juce_audio_processors_headless/format_types/juce_AudioUnitPluginFormatImpl.h index d7920b0ec6..512cb466c9 100644 --- a/modules/juce_audio_processors_headless/format_types/juce_AudioUnitPluginFormatImpl.h +++ b/modules/juce_audio_processors_headless/format_types/juce_AudioUnitPluginFormatImpl.h @@ -1428,7 +1428,7 @@ public: } else { - // Plugin not working correctly, so just bypass.. + // Plugin not working correctly, so just bypass. for (int i = getTotalNumOutputChannels(); --i >= 0;) buffer.clear (i, 0, buffer.getNumSamples()); } diff --git a/modules/juce_audio_processors_headless/format_types/juce_LADSPAPluginFormatHeadless.cpp b/modules/juce_audio_processors_headless/format_types/juce_LADSPAPluginFormatHeadless.cpp index a7c92fc6c6..dede487704 100644 --- a/modules/juce_audio_processors_headless/format_types/juce_LADSPAPluginFormatHeadless.cpp +++ b/modules/juce_audio_processors_headless/format_types/juce_LADSPAPluginFormatHeadless.cpp @@ -278,7 +278,7 @@ public: { tempBuffer.setSize (jmax (1, outputs.size()), samplesPerBlockExpected); - // dodgy hack to force some plugins to initialise the sample rate.. + // dodgy hack to force some plugins to initialise the sample rate if (auto* firstParam = getParameters()[0]) { const auto old = firstParam->getValue(); diff --git a/modules/juce_audio_processors_headless/format_types/juce_VSTPluginFormatImpl.h b/modules/juce_audio_processors_headless/format_types/juce_VSTPluginFormatImpl.h index 8cdfb78262..ff1690c2b0 100644 --- a/modules/juce_audio_processors_headless/format_types/juce_VSTPluginFormatImpl.h +++ b/modules/juce_audio_processors_headless/format_types/juce_VSTPluginFormatImpl.h @@ -1387,7 +1387,7 @@ struct VSTPluginInstanceHeadless : public AudioPluginInstance if (! isPowerOn) setPower (true); - // dodgy hack to force some plugins to initialise the sample rate. + // dodgy hack to force some plugins to initialise the sample rate if (! hasEditor()) { if (auto* firstParam = getParameters()[0]) @@ -1670,7 +1670,7 @@ struct VSTPluginInstanceHeadless : public AudioPluginInstance return 0; } - // handles non plugin-specific callbacks. + // handles non plugin-specific callbacks static pointer_sized_int handleGeneralCallback (int32 opcode, int32 /*index*/, pointer_sized_int /*value*/, void* ptr, float /*opt*/) { switch (opcode) @@ -2442,7 +2442,7 @@ private: } { - // copy any incoming midi. + // Copy any incoming midi. const ScopedLock sl (midiInLock); midiMessages.swapWith (incomingMidi); @@ -2557,7 +2557,7 @@ private: { char nm[256] = { 0 }; - // only do this if the plugin can't use indexed names. + // only do this if the plugin can't use indexed names if (dispatch (Vst2::effGetProgramNameIndexed, 0, -1, nm, 0) == 0) { auto oldProgram = getCurrentProgram(); diff --git a/modules/juce_audio_processors_headless/processors/juce_AudioPluginInstance.cpp b/modules/juce_audio_processors_headless/processors/juce_AudioPluginInstance.cpp index 106c6a832d..29dec4943d 100644 --- a/modules/juce_audio_processors_headless/processors/juce_AudioPluginInstance.cpp +++ b/modules/juce_audio_processors_headless/processors/juce_AudioPluginInstance.cpp @@ -54,7 +54,7 @@ String AudioPluginInstance::getParameterID (int parameterIndex) // AudioProcessorParameter class, and the previous behaviour of JUCE's // plug-in hosting code simply returns a string version of the index; to // maintain backwards compatibility you should perform the operation below - // this comment. However the caveat is that for plug-ins which change their + // this comment. However, the caveat is that for plug-ins which change their // number of parameters dynamically at runtime you cannot rely upon the // returned parameter ID mapping to the correct parameter. A comprehensive // solution to this problem requires some additional work in JUCE's hosting diff --git a/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.cpp b/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.cpp index 3699727d98..eba8a1207f 100644 --- a/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.cpp +++ b/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.cpp @@ -62,7 +62,7 @@ AudioProcessor::~AudioProcessor() { const ScopedLock sl (activeEditorLock); - // ooh, nasty - the editor should have been deleted before its AudioProcessor. + // ooh, nasty - the editor should have been deleted before its AudioProcessor jassert (activeEditor == nullptr); } @@ -955,7 +955,7 @@ void AudioProcessor::copyXmlToBinary (const XmlElement& xml, juce::MemoryBlock& out.writeByte (0); } - // go back and write the string length.. + // go back and write the string length static_cast (destData.getData())[1] = ByteOrder::swapIfBigEndian ((uint32) destData.getSize() - 9); } diff --git a/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h b/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h index 8fec4270b4..fb4ba635d3 100644 --- a/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors_headless/processors/juce_AudioProcessor.h @@ -912,7 +912,7 @@ public: { suspendProcessing (true); - ..do something that takes ages.. + ...do something that takes ages... suspendProcessing (false); } diff --git a/modules/juce_audio_processors_headless/processors/juce_AudioProcessorGraph.cpp b/modules/juce_audio_processors_headless/processors/juce_AudioProcessorGraph.cpp index d983118557..6d7c5f50ac 100644 --- a/modules/juce_audio_processors_headless/processors/juce_AudioProcessorGraph.cpp +++ b/modules/juce_audio_processors_headless/processors/juce_AudioProcessorGraph.cpp @@ -1178,10 +1178,10 @@ private: return index; } - // Handle an input from a single source.. + // Handle an input from a single source. if (sources.size() == 1) { - // channel with a straightforward single input.. + // channel with a straightforward single input auto src = *sources.begin(); int bufIndex = getBufferContaining (src); @@ -1217,7 +1217,7 @@ private: return bufIndex; } - // Handle a mix of several outputs coming into this input.. + // Handle a mix of several outputs coming into this input. int reusableInputIndex = -1; int bufIndex = -1; @@ -1229,7 +1229,7 @@ private: if (sourceBufIndex >= 0 && ! isBufferNeededLater (reversed, ourRenderingIndex, inputChan, src)) { - // we've found one of our input chans that can be re-used.. + // we've found one of our input chans that can be re-used reusableInputIndex = i; bufIndex = sourceBufIndex; @@ -1247,7 +1247,7 @@ private: if (reusableInputIndex < 0) { - // can't re-use any of our input chans, so get a new one and copy everything into it.. + // can't re-use any of our input chans, so get a new one and copy everything into it bufIndex = getFreeBuffer (audioBuffers); jassert (bufIndex != 0); @@ -1315,7 +1315,7 @@ private: auto& processor = *node.getProcessor(); auto sources = c.getSourcesForDestination ({ node.nodeID, midiChannelIndex }); - // No midi inputs.. + // no midi inputs if (sources.empty()) { auto midiBufferToUse = getFreeBuffer (midiBuffers); // need to pick a buffer even if the processor doesn't use midi @@ -1326,7 +1326,7 @@ private: return midiBufferToUse; } - // One midi input.. + // one midi input if (sources.size() == 1) { auto src = *sources.begin(); @@ -1337,7 +1337,7 @@ private: if (isBufferNeededLater (reversed, ourRenderingIndex, midiChannelIndex, src)) { // can't mess up this channel because it's needed later by another node, so we - // need to use a copy of it.. + // need to use a copy of it auto newFreeBuffer = getFreeBuffer (midiBuffers); sequence.addCopyMidiBufferOp (midiBufferToUse, newFreeBuffer); midiBufferToUse = newFreeBuffer; @@ -1345,14 +1345,14 @@ private: } else { - // probably a feedback loop, so just use an empty one.. + // probably a feedback loop, so just use an empty one midiBufferToUse = getFreeBuffer (midiBuffers); // need to pick a buffer even if the processor doesn't use midi } return midiBufferToUse; } - // Multiple midi inputs.. + // multiple midi inputs int midiBufferToUse = -1; int reusableInputIndex = -1; @@ -1365,7 +1365,7 @@ private: if (sourceBufIndex >= 0 && ! isBufferNeededLater (reversed, ourRenderingIndex, midiChannelIndex, src)) { - // we've found one of our input buffers that can be re-used.. + // we've found one of our input buffers that can be re-used reusableInputIndex = i; midiBufferToUse = sourceBufIndex; break; @@ -1377,7 +1377,7 @@ private: if (reusableInputIndex < 0) { - // can't re-use any of our input buffers, so get a new one and copy everything into it.. + // can't re-use any of our input buffers, so get a new one and copy everything into it midiBufferToUse = getFreeBuffer (midiBuffers); jassert (midiBufferToUse >= 0); diff --git a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp index 5baac327b3..519310ba96 100644 --- a/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp +++ b/modules/juce_audio_utils/gui/juce_MidiKeyboardComponent.cpp @@ -41,7 +41,7 @@ MidiKeyboardComponent::MidiKeyboardComponent (MidiKeyboardState& stateToUse, Ori { state.addListener (this); - // initialise with a default set of qwerty key-mappings. + // initialise with a default set of qwerty key-mappings const std::string_view keys { "awsedftgyhujkolp;" }; for (const char& c : keys) diff --git a/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp b/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp index c891badfde..20ad0dd70e 100644 --- a/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp +++ b/modules/juce_audio_utils/native/juce_AudioCDReader_windows.cpp @@ -427,7 +427,7 @@ DWORD performScsiPassThroughCommand (SRB_ExecSCSICmd* const srb, const char driv //============================================================================== -// Controller types.. +// controller types class ControllerType1 final : public CDController { @@ -1130,7 +1130,7 @@ bool AudioCDReader::readSamples (int* const* destSamples, int numDestChannels, i } // sometimes the read fails for just the very last couple of blocks, so - // we'll ignore and errors in the last half-second of the disk.. + // we'll ignore and errors in the last half-second of the disk ok = startSampleInFile > (trackStartSamples [getNumTracks()] - 20000); break; } @@ -1241,7 +1241,7 @@ Array AudioCDReader::findIndexesInTrack (const int trackNumber) if (index == 0) { - // lead-out, so skip back a bit if we've not found any indexes yet.. + // lead-out, so skip back a bit if we've not found any indexes yet if (seenAnIndex) break; diff --git a/modules/juce_core/containers/juce_Array.h b/modules/juce_core/containers/juce_Array.h index ffc0234520..c7e31d6d59 100644 --- a/modules/juce_core/containers/juce_Array.h +++ b/modules/juce_core/containers/juce_Array.h @@ -1074,7 +1074,7 @@ public: int compareElements (ElementType first, ElementType second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first diff --git a/modules/juce_core/containers/juce_ElementComparator.h b/modules/juce_core/containers/juce_ElementComparator.h index 2c935e5b70..3d9eed8b7f 100644 --- a/modules/juce_core/containers/juce_ElementComparator.h +++ b/modules/juce_core/containers/juce_ElementComparator.h @@ -69,7 +69,7 @@ private: int compareElements (ElementType first, ElementType second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first @@ -119,7 +119,7 @@ static void sortArray (ElementComparator& comparator, int compareElements (ElementType first, ElementType second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first diff --git a/modules/juce_core/containers/juce_HashMap.h b/modules/juce_core/containers/juce_HashMap.h index ae488a3ef3..8e5d138723 100644 --- a/modules/juce_core/containers/juce_HashMap.h +++ b/modules/juce_core/containers/juce_HashMap.h @@ -98,7 +98,7 @@ struct DefaultHashFunctions DBG (hash [1]); // prints "item1" DBG (hash [2]); // prints "item2" - // This iterates the map, printing all of its key -> value pairs.. + // This iterates the map, printing all of its key -> value pairs. for (HashMap::Iterator i (hash); i.next();) DBG (i.getKey() << " -> " << i.getValue()); @endcode diff --git a/modules/juce_core/containers/juce_NamedValueSet.cpp b/modules/juce_core/containers/juce_NamedValueSet.cpp index 2bd9d0bb06..34841838ae 100644 --- a/modules/juce_core/containers/juce_NamedValueSet.cpp +++ b/modules/juce_core/containers/juce_NamedValueSet.cpp @@ -115,7 +115,7 @@ bool NamedValueSet::operator== (const NamedValueSet& other) const noexcept } else { - // if we encounter keys that are in a different order, search remaining items by brute force.. + // 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)) diff --git a/modules/juce_core/containers/juce_OwnedArray.h b/modules/juce_core/containers/juce_OwnedArray.h index 4031bcfa5c..d97ac445f6 100644 --- a/modules/juce_core/containers/juce_OwnedArray.h +++ b/modules/juce_core/containers/juce_OwnedArray.h @@ -44,7 +44,7 @@ namespace juce Declare it in the form: OwnedArray - ..and then add new objects, e.g. myOwnedArray.add (new MyObjectClass()); + ...and then add new objects, e.g. myOwnedArray.add (new MyObjectClass()); After adding objects, they are 'owned' by the array and will be deleted when removed or replaced. @@ -440,7 +440,7 @@ public: else { jassertfalse; // you're trying to set an object at a negative index, which doesn't have - // any effect - but since the object is not being added, it may be leaking.. + // any effect - but since the object is not being added, it may be leaking } return newObject; @@ -775,7 +775,7 @@ public: int compareElements (ElementType* first, ElementType* second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first diff --git a/modules/juce_core/containers/juce_ReferenceCountedArray.h b/modules/juce_core/containers/juce_ReferenceCountedArray.h index ef7b1985e2..158267f598 100644 --- a/modules/juce_core/containers/juce_ReferenceCountedArray.h +++ b/modules/juce_core/containers/juce_ReferenceCountedArray.h @@ -797,7 +797,7 @@ public: int compareElements (ElementType first, ElementType second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first diff --git a/modules/juce_core/containers/juce_SortedSet.h b/modules/juce_core/containers/juce_SortedSet.h index caabf52000..b15b24f9ca 100644 --- a/modules/juce_core/containers/juce_SortedSet.h +++ b/modules/juce_core/containers/juce_SortedSet.h @@ -293,7 +293,7 @@ public: if (newElement == elem) { - elem = newElement; // force an update in case operator== permits differences. + elem = newElement; // force an update in case operator== permits differences return false; } diff --git a/modules/juce_core/files/juce_DirectoryIterator.cpp b/modules/juce_core/files/juce_DirectoryIterator.cpp index 782636472c..b334e15083 100644 --- a/modules/juce_core/files/juce_DirectoryIterator.cpp +++ b/modules/juce_core/files/juce_DirectoryIterator.cpp @@ -114,7 +114,7 @@ bool DirectoryIterator::next (bool* isDirResult, bool* isHiddenResult, int64* fi matches = (whatToLookFor & File::findFiles) != 0; } - // if we're not relying on the OS iterator to do the wildcard match, do it now.. + // if we're not relying on the OS iterator to do the wildcard match, do it now if (matches && (isRecursive || wildCards.size() > 1)) matches = fileMatches (wildCards, filename); diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index 4fd9e4288c..2d9409da0e 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -145,7 +145,7 @@ String File::parseAbsolutePath (const String& p) return {}; #if JUCE_WINDOWS - // Windows.. + // Windows auto path = normaliseSeparators (removeEllipsis (p.replaceCharacter ('/', '\\'))); if (path.startsWithChar (getSeparatorChar())) @@ -178,7 +178,7 @@ String File::parseAbsolutePath (const String& p) return File::getCurrentWorkingDirectory().getChildFile (path).getFullPathName(); } #else - // Mac or Linux.. + // Mac or Linux // Yes, I know it's legal for a unix pathname to contain a backslash, but this assertion is here // to catch anyone who's trying to run code that was written on Windows with hard-coded path names. @@ -228,7 +228,7 @@ String File::parseAbsolutePath (const String& p) } #endif - while (path.endsWithChar (getSeparatorChar()) && path != getSeparatorString()) // careful not to turn a single "/" into an empty string. + while (path.endsWithChar (getSeparatorChar()) && path != getSeparatorString()) // careful not to turn a single "/" into an empty string path = path.dropLastCharacters (1); return path; @@ -629,7 +629,7 @@ File File::getNonexistentChildFile (const String& suggestedPrefix, int number = 1; auto prefix = suggestedPrefix; - // remove any bracketed numbers that may already be on the end.. + // remove any bracketed numbers that may already be on the end if (prefix.trim().endsWithChar (')')) { putNumbersInBrackets = true; @@ -941,7 +941,7 @@ String File::getRelativePathFrom (const File& dir) const } } - // if the only common bit is the root, then just return the full path.. + // if the only common bit is the root, then just return the full path if (commonBitLength == 0 || (commonBitLength == 1 && thisPath[1] == getSeparatorChar())) return fullPath; @@ -1118,7 +1118,7 @@ public: if (roots[i].exists()) ++numRootsExisting; - // (on windows, some of the drives may not contain media, so as long as at least one is ok..) + // on windows, some of the drives may not contain media, so as long as at least one is ok expect (numRootsExisting > 0); } diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index f59e8c25c3..0e82fcca44 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -756,7 +756,7 @@ public: the file first and then re-writing it, it creates a new temporary file, writes the data to that, and then moves the new file to replace the existing file. This means that if the power gets pulled out or something crashes, - you're a lot less likely to end up with a corrupted or unfinished file.. + you're a lot less likely to end up with a corrupted or unfinished file. Returns true if the operation succeeds, or false if it fails. @@ -791,7 +791,7 @@ public: the file first and then re-writing it, it creates a new temporary file, writes the text to that, and then moves the new file to replace the existing file. This means that if the power gets pulled out or something crashes, - you're a lot less likely to end up with an empty file.. + you're a lot less likely to end up with an empty file. For an explanation of the parameters here, see the appendText() method. diff --git a/modules/juce_core/files/juce_TemporaryFile.cpp b/modules/juce_core/files/juce_TemporaryFile.cpp index 91a049661b..4639e0c318 100644 --- a/modules/juce_core/files/juce_TemporaryFile.cpp +++ b/modules/juce_core/files/juce_TemporaryFile.cpp @@ -99,7 +99,7 @@ bool TemporaryFile::overwriteTargetFileWithTemporary() const if (temporaryFile.exists()) { - // Have a few attempts at overwriting the file before giving up.. + // Have a few attempts at overwriting the file before giving up. for (int i = 5; --i >= 0;) { if (temporaryFile.replaceFileIn (targetFile)) @@ -120,7 +120,7 @@ bool TemporaryFile::overwriteTargetFileWithTemporary() const bool TemporaryFile::deleteTemporaryFile() const { - // Have a few attempts at deleting the file before giving up.. + // Have a few attempts at deleting the file before giving up. for (int i = 5; --i >= 0;) { if (temporaryFile.isDirectory() ? temporaryFile.deleteRecursively() : temporaryFile.deleteFile()) diff --git a/modules/juce_core/files/juce_TemporaryFile.h b/modules/juce_core/files/juce_TemporaryFile.h index dffe03dbd7..5794bd8d05 100644 --- a/modules/juce_core/files/juce_TemporaryFile.h +++ b/modules/juce_core/files/juce_TemporaryFile.h @@ -58,12 +58,12 @@ namespace juce out->write ( ...etc ) out.reset(); // (deletes the stream) - // ..now we've finished writing, this will rename the temp file to - // make it replace the target file we specified above. + // ...now we've finished writing, this will rename the temp file to + // make it replace the target file we specified above bool succeeded = temp.overwriteTargetFileWithTemporary(); } - // ..and even if something went wrong and our overwrite failed, + // ...and even if something went wrong and our overwrite failed, // as the TemporaryFile object goes out of scope here, it'll make sure // that the temp file gets deleted. } diff --git a/modules/juce_core/maths/juce_BigInteger.cpp b/modules/juce_core/maths/juce_BigInteger.cpp index 73e45c9aaf..1643406d93 100644 --- a/modules/juce_core/maths/juce_BigInteger.cpp +++ b/modules/juce_core/maths/juce_BigInteger.cpp @@ -250,7 +250,7 @@ uint32 BigInteger::getBitRangeAsInt (const int startBit, int numBits) const noex { if (numBits > 32) { - jassertfalse; // use getBitRange() if you need more than 32 bits.. + jassertfalse; // use getBitRange() if you need more than 32 bits numBits = 32; } @@ -646,7 +646,7 @@ BigInteger& BigInteger::operator|= (const BigInteger& other) if (this == &other) return *this; - // this operation doesn't take into account negative values.. + // this operation doesn't take into account negative values jassert (isNegative() == other.isNegative()); if (other.highestBit >= 0) @@ -673,7 +673,7 @@ BigInteger& BigInteger::operator&= (const BigInteger& other) if (this == &other) return *this; - // this operation doesn't take into account negative values.. + // this operation doesn't take into account negative values jassert (isNegative() == other.isNegative()); auto* values = getValues(); diff --git a/modules/juce_core/maths/juce_Expression.cpp b/modules/juce_core/maths/juce_Expression.cpp index 5b68c7145d..ed93b61861 100644 --- a/modules/juce_core/maths/juce_Expression.cpp +++ b/modules/juce_core/maths/juce_Expression.cpp @@ -909,7 +909,7 @@ struct Expression::Helpers return *new DotOperator (new SymbolTerm (identifier), rhs); } - // just a symbol.. + // just a symbol jassert (identifier.trim() == identifier); return *new SymbolTerm (identifier); } diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index 75916abfdc..b403c8f2a7 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -521,7 +521,7 @@ Type jlimit (Type lowerLimit, Type upperLimit, Type valueToConstrain) noexcept { - jassert (lowerLimit <= upperLimit); // if these are in the wrong order, results are unpredictable.. + jassert (lowerLimit <= upperLimit); // if these are in the wrong order, results are unpredictable return valueToConstrain < lowerLimit ? lowerLimit : (upperLimit < valueToConstrain ? upperLimit @@ -536,14 +536,14 @@ Type jlimit (Type lowerLimit, template bool isPositiveAndBelow (Type1 valueToTest, Type2 upperLimit) noexcept { - jassert (Type1() <= static_cast (upperLimit)); // makes no sense to call this if the upper limit is itself below zero.. + jassert (Type1() <= static_cast (upperLimit)); // makes no sense to call this if the upper limit is itself below zero return Type1() <= valueToTest && valueToTest < static_cast (upperLimit); } template bool isPositiveAndBelow (int valueToTest, Type upperLimit) noexcept { - jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero.. + jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero return static_cast (valueToTest) < static_cast (upperLimit); } @@ -555,14 +555,14 @@ bool isPositiveAndBelow (int valueToTest, Type upperLimit) noexcept template bool isPositiveAndNotGreaterThan (Type1 valueToTest, Type2 upperLimit) noexcept { - jassert (Type1() <= static_cast (upperLimit)); // makes no sense to call this if the upper limit is itself below zero.. + jassert (Type1() <= static_cast (upperLimit)); // makes no sense to call this if the upper limit is itself below zero return Type1() <= valueToTest && valueToTest <= static_cast (upperLimit); } template bool isPositiveAndNotGreaterThan (int valueToTest, Type upperLimit) noexcept { - jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero.. + jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero return static_cast (valueToTest) <= static_cast (upperLimit); } diff --git a/modules/juce_core/memory/juce_HeapBlock.h b/modules/juce_core/memory/juce_HeapBlock.h index 4a157178ed..f663143ca5 100644 --- a/modules/juce_core/memory/juce_HeapBlock.h +++ b/modules/juce_core/memory/juce_HeapBlock.h @@ -73,7 +73,7 @@ namespace HeapBlockHelper free (temp); @endcode - ..you could just write this: + ...you could just write this: @code HeapBlock temp (1024); memcpy (temp, xyz, 1024 * sizeof (int)); @@ -343,7 +343,7 @@ private: auto* memory = static_cast (f()); #if JUCE_EXCEPTIONS_DISABLED - jassert (memory != nullptr); // without exceptions, you'll need to find a better way to handle this failure case. + jassert (memory != nullptr); // without exceptions, you'll need to find a better way to handle this failure case #else HeapBlockHelper::ThrowOnFail::checkPointer (memory); #endif diff --git a/modules/juce_core/memory/juce_LeakedObjectDetector.h b/modules/juce_core/memory/juce_LeakedObjectDetector.h index ed027bfa36..f99b47c3f7 100644 --- a/modules/juce_core/memory/juce_LeakedObjectDetector.h +++ b/modules/juce_core/memory/juce_LeakedObjectDetector.h @@ -67,7 +67,7 @@ public: DBG ("*** Dangling pointer deletion! Class: " << getLeakedObjectClassName()); /** If you hit this, then you've managed to delete more instances of this class than you've - created.. That indicates that you're deleting some dangling pointers. + created. That indicates that you're deleting some dangling pointers. Note that although this assertion will have been triggered during a destructor, it might not be this particular deletion that's at fault - the incorrect one may have happened diff --git a/modules/juce_core/memory/juce_MemoryBlock.cpp b/modules/juce_core/memory/juce_MemoryBlock.cpp index ceafbf18f8..3702ca5e2b 100644 --- a/modules/juce_core/memory/juce_MemoryBlock.cpp +++ b/modules/juce_core/memory/juce_MemoryBlock.cpp @@ -369,7 +369,7 @@ String MemoryBlock::toBase64Encoding() const { auto numChars = ((size << 3) + 5) / 6; - String destString ((unsigned int) size); // store the length, followed by a '.', and then the data. + String destString ((unsigned int) size); // store the length, followed by a '.', and then the data auto initialLen = destString.length(); destString.preallocateBytes ((size_t) initialLen * sizeof (String::CharPointerType::CharType) + 2 + numChars); diff --git a/modules/juce_core/memory/juce_ReferenceCountedObject.h b/modules/juce_core/memory/juce_ReferenceCountedObject.h index 1c31662577..fcde2ecd13 100644 --- a/modules/juce_core/memory/juce_ReferenceCountedObject.h +++ b/modules/juce_core/memory/juce_ReferenceCountedObject.h @@ -48,7 +48,7 @@ namespace juce void foo(); // This is a neat way of declaring a typedef for a pointer class, - // rather than typing out the full templated name each time.. + // rather than typing out the full templated name each time. using Ptr = ReferenceCountedObjectPtr; }; diff --git a/modules/juce_core/memory/juce_Singleton.h b/modules/juce_core/memory/juce_Singleton.h index 70db5c4876..23c9f1638f 100644 --- a/modules/juce_core/memory/juce_Singleton.h +++ b/modules/juce_core/memory/juce_Singleton.h @@ -178,7 +178,7 @@ struct SingletonHolder : private MutexType // (inherited so we can use the empt JUCE_DECLARE_SINGLETON (MySingleton, false) }; - // ..and this goes in a suitable .cpp file: + // ...and this goes in a suitable .cpp file: JUCE_IMPLEMENT_SINGLETON (MySingleton) @@ -187,7 +187,7 @@ struct SingletonHolder : private MutexType // (inherited so we can use the empt ... - MySingleton::deleteInstance(); // safely deletes the singleton (if it's been created). + MySingleton::deleteInstance(); // safely deletes the singleton (if it's been created) @endcode diff --git a/modules/juce_core/memory/juce_WeakReference.h b/modules/juce_core/memory/juce_WeakReference.h index 9e1fdfbfda..1dd77aa664 100644 --- a/modules/juce_core/memory/juce_WeakReference.h +++ b/modules/juce_core/memory/juce_WeakReference.h @@ -71,7 +71,7 @@ namespace juce OR: just use the handy JUCE_DECLARE_WEAK_REFERENCEABLE macro to do all this for you. - // Here's an example of using a pointer.. + // Here's an example of using a pointer. auto* n = new MyObject(); WeakReference myObjectRef = n; diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index 5177c6c5fb..e4fd903e0a 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -276,7 +276,7 @@ #include #endif -// Need to clear various moronic redefinitions made by system headers.. +// Need to clear various moronic redefinitions made by system headers. #undef max #undef min #undef direct diff --git a/modules/juce_core/native/juce_Files_mac.mm b/modules/juce_core/native/juce_Files_mac.mm index 3e81d843bf..af6b6ee11d 100644 --- a/modules/juce_core/native/juce_Files_mac.mm +++ b/modules/juce_core/native/juce_Files_mac.mm @@ -477,7 +477,7 @@ OSType File::getMacOSType() const bool File::isBundle() const { #if JUCE_IOS - return false; // xxx can't find a sensible way to do this without trying to open the bundle.. + return false; // xxx can't find a sensible way to do this without trying to open the bundle #else JUCE_AUTORELEASEPOOL { diff --git a/modules/juce_core/native/juce_Files_windows.cpp b/modules/juce_core/native/juce_Files_windows.cpp index 8db0a1ff91..ada8d31f76 100644 --- a/modules/juce_core/native/juce_Files_windows.cpp +++ b/modules/juce_core/native/juce_Files_windows.cpp @@ -342,7 +342,7 @@ bool File::moveToTrash() const if (! exists()) return true; - // The string we pass in must be double null terminated.. + // The string we pass in must be double null terminated. const size_t numBytes = CharPointer_UTF16::getBytesRequiredFor (fullPath.getCharPointer()) + 8; HeapBlock doubleNullTermPath; doubleNullTermPath.calloc (numBytes, 1); diff --git a/modules/juce_core/native/juce_Network_android.cpp b/modules/juce_core/native/juce_Network_android.cpp index 320132ee50..c95895a434 100644 --- a/modules/juce_core/native/juce_Network_android.cpp +++ b/modules/juce_core/native/juce_Network_android.cpp @@ -401,7 +401,7 @@ public: LocalRef responseHeaderBuffer (env->NewObject (StringBuffer, StringBuffer.constructor)); // Annoyingly, the android HTTP functions will choke on this call if you try to do it on the message - // thread. You'll need to move your networking code to a background thread to keep it happy.. + // thread. You'll need to move your networking code to a background thread to keep it happy. jassert (Thread::getCurrentThread() != nullptr); jintArray statusCodeArray = env->NewIntArray (1); diff --git a/modules/juce_core/native/juce_Network_windows.cpp b/modules/juce_core/native/juce_Network_windows.cpp index 4342d263a4..b22468b504 100644 --- a/modules/juce_core/native/juce_Network_windows.cpp +++ b/modules/juce_core/native/juce_Network_windows.cpp @@ -292,7 +292,7 @@ private: if (sessionHandle != nullptr) { - // break up the url.. + // break up the url const int fileNumChars = 65536; const int serverNumChars = 2048; const int usernameNumChars = 1024; diff --git a/modules/juce_core/native/juce_SharedCode_posix.h b/modules/juce_core/native/juce_SharedCode_posix.h index 956b3bc61e..85a72bec0e 100644 --- a/modules/juce_core/native/juce_SharedCode_posix.h +++ b/modules/juce_core/native/juce_SharedCode_posix.h @@ -190,7 +190,7 @@ namespace } #if ! JUCE_WASM - // if this file doesn't exist, find a parent of it that does.. + // if this file doesn't exist, find a parent of it that does bool juce_doStatFS (File f, struct statfs& result) { for (int i = 5; --i >= 0;) @@ -318,7 +318,7 @@ static bool setFileModeFlags (const String& fullPath, mode_t flags, bool shouldS bool File::setFileReadOnlyInternal (bool shouldBeReadOnly) const { - // Hmm.. should we give global write permission or just the current user? + // Should we give global write permission or just the current user? return setFileModeFlags (fullPath, S_IWUSR | S_IWGRP | S_IWOTH, ! shouldBeReadOnly); } @@ -707,7 +707,7 @@ void juce_runSystemCommand (const String& command) String juce_getOutputFromCommand (const String&); String juce_getOutputFromCommand (const String& command) { - // slight bodge here, as we just pipe the output into a temp file and read it... + // slight bodge here, as we just pipe the output into a temp file and read it auto tempFile = File::getSpecialLocation (File::tempDirectory) .getNonexistentChildFile (String::toHexString (Random::getSystemRandom().nextInt()), ".tmp", false); @@ -726,7 +726,7 @@ class InterProcessLock::Pimpl public: Pimpl (const String&, int) {} - int handle = 1, refCount = 1; // On iOS just fake success.. + int handle = 1, refCount = 1; // on iOS just fake success }; #else @@ -738,7 +738,7 @@ public: { #if JUCE_MAC if (! createLockFile (File ("~/Library/Caches/com.juce.locks").getChildFile (lockName), timeOutMillisecs)) - // Fallback if the user's home folder is on a network drive with no ability to lock.. + // fallback if the user's home folder is on a network drive with no ability to lock createLockFile (File ("/tmp/com.juce.locks").getChildFile (lockName), timeOutMillisecs); #else @@ -795,7 +795,7 @@ public: } closeFile(); - return true; // only false if there's a file system error. Failure to lock still returns true. + return true; // only false if there's a file system error. Failure to lock still returns true } void closeFile() @@ -1127,7 +1127,7 @@ public: } else if (result == 0) { - // we're the child process.. + // we're the child process close (pipeHandles[0]); // close the read handle if ((streamFlags & wantStdOut) != 0) @@ -1155,7 +1155,7 @@ public: } else { - // we're the parent process.. + // we're the parent process childPID = result; pipeHandle = pipeHandles[0]; close (pipeHandles[1]); // close the write handle diff --git a/modules/juce_core/native/juce_SystemStats_linux.cpp b/modules/juce_core/native/juce_SystemStats_linux.cpp index 4ede6a2de2..511dcab908 100644 --- a/modules/juce_core/native/juce_SystemStats_linux.cpp +++ b/modules/juce_core/native/juce_SystemStats_linux.cpp @@ -73,7 +73,6 @@ bool SystemStats::isOperatingSystem64Bit() #if JUCE_64BIT return true; #else - //xxx not sure how to find this out?.. return false; #endif } diff --git a/modules/juce_core/native/juce_Threads_windows.cpp b/modules/juce_core/native/juce_Threads_windows.cpp index a459a7800e..c5f15e312b 100644 --- a/modules/juce_core/native/juce_Threads_windows.cpp +++ b/modules/juce_core/native/juce_Threads_windows.cpp @@ -233,7 +233,7 @@ static int lastProcessPriority = -1; void juce_repeatLastProcessPriority(); void juce_repeatLastProcessPriority() { - if (lastProcessPriority >= 0) // (avoid changing this if it's not been explicitly set by the app..) + if (lastProcessPriority >= 0) // avoid changing this if it's not been explicitly set by the app { DWORD p; @@ -295,7 +295,7 @@ void JUCE_CALLTYPE Process::terminate() _CrtDumpMemoryLeaks(); #endif - // bullet in the head in case there's a problem shutting down.. + // bullet in the head in case there's a problem shutting down ExitProcess (1); } diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp index 7b1b560590..9066eadd62 100644 --- a/modules/juce_core/network/juce_Socket.cpp +++ b/modules/juce_core/network/juce_Socket.cpp @@ -153,7 +153,7 @@ namespace SocketHelpers if (isListener) { - // need to do this to interrupt the accept() function.. + // need to do this to interrupt the accept() function StreamingSocket temp; temp.connect (IPAddress::local().toString(), portNumber, 1000); } diff --git a/modules/juce_core/network/juce_URL.cpp b/modules/juce_core/network/juce_URL.cpp index 26b8a26b3b..d5e6eb038f 100644 --- a/modules/juce_core/network/juce_URL.cpp +++ b/modules/juce_core/network/juce_URL.cpp @@ -507,7 +507,7 @@ void URL::createHeadersAndPostData (String& headers, if (filesToUpload.size() > 0) { - // (this doesn't currently support mixing custom post-data with uploads..) + // this doesn't currently support mixing custom post-data with uploads jassert (postData.isEmpty()); auto boundary = String::toHexString (Random::getSystemRandom().nextInt64()); @@ -550,7 +550,7 @@ void URL::createHeadersAndPostData (String& headers, data << postData; - // if the user-supplied headers didn't contain a content-type, add one now.. + // if the user-supplied headers didn't contain a content-type, add one now if (! headers.containsIgnoreCase ("Content-Type")) headers << "Content-Type: application/x-www-form-urlencoded\r\n"; diff --git a/modules/juce_core/streams/juce_MemoryOutputStream.cpp b/modules/juce_core/streams/juce_MemoryOutputStream.cpp index f81d45565b..612b50ab11 100644 --- a/modules/juce_core/streams/juce_MemoryOutputStream.cpp +++ b/modules/juce_core/streams/juce_MemoryOutputStream.cpp @@ -177,13 +177,13 @@ bool MemoryOutputStream::setPosition (int64 newPosition) return true; } - // can't move beyond the end of the stream.. + // can't move beyond the end of the stream return false; } int64 MemoryOutputStream::writeFromInputStream (InputStream& source, int64 maxNumBytesToWrite) { - // before writing from an input, see if we can preallocate to make it more efficient.. + // before writing from an input, see if we can preallocate to make it more efficient const auto availableData = source.getTotalLength() - source.getPosition(); if (availableData > 0) diff --git a/modules/juce_core/streams/juce_OutputStream.cpp b/modules/juce_core/streams/juce_OutputStream.cpp index 2a83d19f8d..3d1682fefa 100644 --- a/modules/juce_core/streams/juce_OutputStream.cpp +++ b/modules/juce_core/streams/juce_OutputStream.cpp @@ -48,7 +48,7 @@ struct DanglingStreamChecker It's always a bad idea to leak any object, but if you're leaking output streams, then there's a good chance that you're failing to flush a file to disk properly, which could result in corrupted data and other similar - nastiness.. + nastiness. */ jassert (activeStreams.size() == 0); diff --git a/modules/juce_core/system/juce_PlatformDefs.h b/modules/juce_core/system/juce_PlatformDefs.h index feb78b6523..f5d6e9b563 100644 --- a/modules/juce_core/system/juce_PlatformDefs.h +++ b/modules/juce_core/system/juce_PlatformDefs.h @@ -187,7 +187,7 @@ namespace juce #else //============================================================================== - // If debugging is disabled, these dummy debug and assertion macros are used.. + // If debugging is disabled, these dummy debug and assertion macros are used. #define DBG(textToWrite) #define jassertfalse JUCE_BLOCK_WITH_FORCED_SEMICOLON (JUCE_LOG_CURRENT_ASSERTION;) @@ -228,19 +228,19 @@ namespace juce @code class MyClass { - etc.. + etc. private: MyClass (const MyClass&); MyClass& operator= (const MyClass&); };@endcode - ..you can just write: + ...you can just write: @code class MyClass { - etc.. + etc. private: JUCE_DECLARE_NON_COPYABLE (MyClass) diff --git a/modules/juce_core/system/juce_StandardHeader.h b/modules/juce_core/system/juce_StandardHeader.h index a1e50c092c..2d8862bc0f 100644 --- a/modules/juce_core/system/juce_StandardHeader.h +++ b/modules/juce_core/system/juce_StandardHeader.h @@ -95,7 +95,7 @@ #include "juce_PlatformDefs.h" //============================================================================== -// Now we'll include some common OS headers.. +// Now we'll include some common OS headers. JUCE_BEGIN_IGNORE_WARNINGS_MSVC (4514 4245 4100) #if JUCE_MSVC @@ -134,7 +134,7 @@ JUCE_END_IGNORE_WARNINGS_MSVC #include #endif -// undef symbols that are sometimes set by misguided 3rd-party headers.. +// undef symbols that are sometimes set by misguided 3rd-party headers #undef TYPE_BOOL #undef max #undef min diff --git a/modules/juce_core/system/juce_SystemStats.h b/modules/juce_core/system/juce_SystemStats.h index ac7f2ca9b0..f6c69770cc 100644 --- a/modules/juce_core/system/juce_SystemStats.h +++ b/modules/juce_core/system/juce_SystemStats.h @@ -204,7 +204,7 @@ public: static StringArray getMachineIdentifiers (MachineIdFlags flags); //============================================================================== - // CPU and memory information.. + // CPU and memory information /** Returns the number of logical CPU cores. */ static int getNumCpus() noexcept; diff --git a/modules/juce_core/text/juce_LocalisedStrings.cpp b/modules/juce_core/text/juce_LocalisedStrings.cpp index 1d7a795e13..4c34976ec4 100644 --- a/modules/juce_core/text/juce_LocalisedStrings.cpp +++ b/modules/juce_core/text/juce_LocalisedStrings.cpp @@ -84,7 +84,7 @@ namespace // before the currentMappings object, we can force the static order-of-destruction to // delete the currentMappings object first, which avoids a bogus leak warning. // (Oddly, just creating a LocalisedStrings on the stack doesn't work in gcc, it - // has to be created with 'new' for this to work..) + // has to be created with 'new' for this to work.) struct LeakAvoidanceTrick { LeakAvoidanceTrick() diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index 8ac68ea1f1..3871e30d30 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -314,7 +314,7 @@ String::String (const char* const t) To get around this problem, you must be more explicit when you pass an ambiguous 8-bit string to the String class - so for example if your source data is actually UTF-8, - you'd call String (CharPointer_UTF8 ("my utf8 string..")), and it would be able to + you'd call String (CharPointer_UTF8 ("my utf8 string.")), and it would be able to correctly convert the multi-byte characters to unicode. It's *highly* recommended that you use UTF-8 with escape characters in your source code to represent extended characters, because there's no other way to represent these strings in a way that isn't dependent on @@ -337,7 +337,7 @@ String::String (const char* const t, const size_t maxChars) To get around this problem, you must be more explicit when you pass an ambiguous 8-bit string to the String class - so for example if your source data is actually UTF-8, - you'd call String (CharPointer_UTF8 ("my utf8 string..")), and it would be able to + you'd call String (CharPointer_UTF8 ("my utf8 string.")), and it would be able to correctly convert the multi-byte characters to unicode. It's *highly* recommended that you use UTF-8 with escape characters in your source code to represent extended characters, because there's no other way to represent these strings in a way that isn't dependent on @@ -419,7 +419,7 @@ namespace NumberToStringConverters return t; } - // pass in a pointer to the END of a buffer.. + // pass in a pointer to the END of a buffer static char* numberToString (char* t, int64 n) noexcept { if (n >= 0) @@ -2058,7 +2058,7 @@ struct StringEncodingConverter void* const newSpace = addBytesToPointer (text.getAddress(), (int) endOffset); const CharPointerType_Dest extraSpace (static_cast (newSpace)); - #if JUCE_DEBUG // (This just avoids spurious warnings from valgrind about the uninitialised bytes at the end of the buffer..) + #if JUCE_DEBUG // This just avoids spurious warnings from valgrind about the uninitialised bytes at the end of the buffer. auto bytesToClear = (size_t) jmin ((int) extraBytesNeeded, 4); zeromem (addBytesToPointer (newSpace, extraBytesNeeded - bytesToClear), bytesToClear); #endif @@ -2191,7 +2191,7 @@ StringRef::StringRef (const char* stringLiteral) noexcept To get around this problem, you must be more explicit when you pass an ambiguous 8-bit string to the StringRef class - so for example if your source data is actually UTF-8, - you'd call StringRef (CharPointer_UTF8 ("my utf8 string..")), and it would be able to + you'd call StringRef (CharPointer_UTF8 ("my utf8 string.")), and it would be able to correctly convert the multi-byte characters to unicode. It's *highly* recommended that you use UTF-8 with escape characters in your source code to represent extended characters, because there's no other way to represent these strings in a way that isn't dependent on diff --git a/modules/juce_core/text/juce_String.h b/modules/juce_core/text/juce_String.h index 5daa1fda3e..e2eb29a56f 100644 --- a/modules/juce_core/text/juce_String.h +++ b/modules/juce_core/text/juce_String.h @@ -86,7 +86,7 @@ public: assertion. To create strings with extended characters from UTF-8, you should explicitly call - String (CharPointer_UTF8 ("my utf8 string..")). It's *highly* recommended that you + String (CharPointer_UTF8 ("my utf8 string.")). It's *highly* recommended that you use UTF-8 with escape characters in your source code to represent extended characters, because there's no other way to represent unicode strings in a way that isn't dependent on the compiler, source code editor and platform. @@ -101,7 +101,7 @@ public: assertion. To create strings with extended characters from UTF-8, you should explicitly call - String (CharPointer_UTF8 ("my utf8 string..")). In C++20 or later, you may alternatively + String (CharPointer_UTF8 ("my utf8 string.")). In C++20 or later, you may alternatively pass a char8_t string to indicate a UTF-8 encoding. It's *highly* recommended that you use UTF-8 with escape characters in your source code to represent extended characters, because there's no other way to represent unicode strings in a way that isn't dependent @@ -217,7 +217,7 @@ public: int length() const noexcept; //============================================================================== - // Assignment and concatenation operators.. + // Assignment and concatenation operators /** Replaces this string's contents with another string. */ String& operator= (const String& other) noexcept; @@ -328,7 +328,7 @@ public: } //============================================================================== - // Comparison methods.. + // Comparison methods /** Returns true if the string contains no characters. Note that there's also an isNotEmpty() method to help write readable code. @@ -513,7 +513,7 @@ public: bool matchesWildcard (StringRef wildcard, bool ignoreCase) const noexcept; //============================================================================== - // Substring location methods.. + // Substring location methods /** Searches for a character inside this string. Uses a case-sensitive comparison. @@ -616,7 +616,7 @@ public: //============================================================================== - // Substring extraction and manipulation methods.. + // Substring extraction and manipulation methods /** Returns the character at this index in the string. In a release build, no checks are made to see if the index is within a valid range, so be @@ -976,7 +976,7 @@ public: CharPointerType end() const { return begin().findTerminatingNull(); } //============================================================================== - // Numeric conversions.. + // Numeric conversions /** Creates a string containing this signed 32-bit integer as a decimal number. @see getIntValue, getFloatValue, getDoubleValue, toHexString diff --git a/modules/juce_core/text/juce_StringPairArray.cpp b/modules/juce_core/text/juce_StringPairArray.cpp index 84fdcca6cc..5422e8d3be 100644 --- a/modules/juce_core/text/juce_StringPairArray.cpp +++ b/modules/juce_core/text/juce_StringPairArray.cpp @@ -69,7 +69,7 @@ bool StringPairArray::operator== (const StringPairArray& other) const } else { - // if we encounter keys that are in a different order, search remaining items by brute force.. + // if we encounter keys that are in a different order, search remaining items by brute force for (int j = i; j < num; ++j) { auto otherIndex = other.keys.indexOf (keys[j], other.ignoreCase); diff --git a/modules/juce_core/threads/juce_CriticalSection.h b/modules/juce_core/threads/juce_CriticalSection.h index 2baa4d113a..7545618119 100644 --- a/modules/juce_core/threads/juce_CriticalSection.h +++ b/modules/juce_core/threads/juce_CriticalSection.h @@ -183,11 +183,11 @@ private: { const ScopedLock myScopedLock (objectLock); - // objectLock is now locked.. + // objectLock is now locked... ...do some thread-safe work here... - // ..and objectLock gets unlocked here, as myScopedLock goes out of + // ...and objectLock gets unlocked here, as myScopedLock goes out of // scope at the end of the block } }; @@ -217,18 +217,18 @@ using ScopedLock = CriticalSection::ScopedLockType; { const ScopedLock myScopedLock (objectLock); - // objectLock is now locked.. + // objectLock is now locked... { ScopedUnlock myUnlocker (objectLock); - // ..and now unlocked.. + // ...and now unlocked... } - // ..and now locked again.. + // ...and now locked again... } - // ..and finally unlocked. + // ...and finally unlocked. } }; @endcode @@ -254,14 +254,14 @@ using ScopedUnlock = CriticalSection::ScopedUnlockType; const ScopedTryLock myScopedTryLock (objectLock); // Unlike using a ScopedLock, this may fail to actually get the lock, so you - // must call the isLocked() method before making any assumptions.. + // must call the isLocked() method before making any assumptions. if (myScopedTryLock.isLocked()) { ...safely do some work... } else { - // If we get here, then our attempt at locking failed because another thread had already locked it.. + // If we get here, then our attempt at locking failed because another thread had already locked it. } } }; diff --git a/modules/juce_core/threads/juce_ReadWriteLock.cpp b/modules/juce_core/threads/juce_ReadWriteLock.cpp index 73253fb32e..826ae27e9b 100644 --- a/modules/juce_core/threads/juce_ReadWriteLock.cpp +++ b/modules/juce_core/threads/juce_ReadWriteLock.cpp @@ -101,7 +101,7 @@ void ReadWriteLock::exitRead() const noexcept } } - jassertfalse; // unlocking a lock that wasn't locked.. + jassertfalse; // unlocking a lock that wasn't locked } //============================================================================== @@ -144,7 +144,7 @@ void ReadWriteLock::exitWrite() const noexcept { const SpinLock::ScopedLockType sl (accessLock); - // check this thread actually had the lock.. + // check this thread actually had the lock jassert (numWriters > 0 && writerThreadId == Thread::getCurrentThreadId()); if (--numWriters == 0) diff --git a/modules/juce_core/threads/juce_ScopedLock.h b/modules/juce_core/threads/juce_ScopedLock.h index 720157ba08..2999d4ac2e 100644 --- a/modules/juce_core/threads/juce_ScopedLock.h +++ b/modules/juce_core/threads/juce_ScopedLock.h @@ -54,7 +54,7 @@ namespace juce ...do some stuff... - // myCriticalSection gets unlocked here. + // myCriticalSection gets unlocked here } @endcode @@ -111,11 +111,11 @@ private: const GenericScopedLock myScopedLock (myCriticalSection); // myCriticalSection is now locked - ... do some stuff with it locked .. + ... do some stuff with it locked... while (xyz) { - ... do some stuff with it locked .. + ... do some stuff with it locked... const GenericScopedUnlock unlocker (myCriticalSection); @@ -125,7 +125,7 @@ private: ...do some stuff with it unlocked ... } - // myCriticalSection gets unlocked here. + // myCriticalSection gets unlocked here } @endcode @@ -187,14 +187,14 @@ private: // Unlike using a ScopedLock, this may fail to actually get the lock, so you // should test this with the isLocked() method before doing your thread-unsafe - // action.. + // action. if (myScopedTryLock.isLocked()) { ...do some stuff... } else { - ..our attempt at locking failed because another thread had already locked it.. + ...our attempt at locking failed because another thread had already locked it... } // myCriticalSection gets unlocked here (if it was locked) diff --git a/modules/juce_core/threads/juce_ScopedReadLock.h b/modules/juce_core/threads/juce_ScopedReadLock.h index dcf621b919..cbc7938c0a 100644 --- a/modules/juce_core/threads/juce_ScopedReadLock.h +++ b/modules/juce_core/threads/juce_ScopedReadLock.h @@ -52,7 +52,7 @@ namespace juce ...do some stuff... - // myLock gets unlocked here. + // myLock gets unlocked here } @endcode @@ -117,10 +117,10 @@ private: } else { - ..our attempt at locking failed because a write lock has already been issued.. + ...our attempt at locking failed because a write lock has already been issued... } - // myLock gets unlocked here (if it was locked). + // myLock gets unlocked here (if it was locked) } @endcode diff --git a/modules/juce_core/threads/juce_ScopedWriteLock.h b/modules/juce_core/threads/juce_ScopedWriteLock.h index 81565f40fa..ff43bff60d 100644 --- a/modules/juce_core/threads/juce_ScopedWriteLock.h +++ b/modules/juce_core/threads/juce_ScopedWriteLock.h @@ -52,7 +52,7 @@ namespace juce ...do some stuff... - // myLock gets unlocked here. + // myLock gets unlocked here } @endcode @@ -117,10 +117,10 @@ private: } else { - ..our attempt at locking failed because some other thread has already locked the object.. + ...our attempt at locking failed because some other thread has already locked the object... } - // myLock gets unlocked here (if it was locked). + // myLock gets unlocked here (if it was locked) } @endcode diff --git a/modules/juce_core/threads/juce_Thread.cpp b/modules/juce_core/threads/juce_Thread.cpp index a36b96ce6d..5a75bad4cf 100644 --- a/modules/juce_core/threads/juce_Thread.cpp +++ b/modules/juce_core/threads/juce_Thread.cpp @@ -261,7 +261,7 @@ bool Thread::stopThread (const int timeOutMilliseconds) if (isThreadRunning()) { // very bad karma if this point is reached, as there are bound to be - // locks and events left in silly states when a thread is killed by force.. + // locks and events left in silly states when a thread is killed by force jassertfalse; Logger::writeToLog ("!! killing thread by force !!"); diff --git a/modules/juce_core/threads/juce_ThreadPool.h b/modules/juce_core/threads/juce_ThreadPool.h index ab4c2f9ae8..8143f4327f 100644 --- a/modules/juce_core/threads/juce_ThreadPool.h +++ b/modules/juce_core/threads/juce_ThreadPool.h @@ -82,10 +82,10 @@ public: enum JobStatus { jobHasFinished = 0, /**< indicates that the job has finished and can be - removed from the pool. */ + removed from the pool */ jobNeedsRunningAgain /**< indicates that the job would like to be called - again when a thread is free. */ + again when a thread is free */ }; /** Performs the actual work that this job needs to do. diff --git a/modules/juce_core/threads/juce_TimeSliceThread.cpp b/modules/juce_core/threads/juce_TimeSliceThread.cpp index 4b68d2d48e..aede01166c 100644 --- a/modules/juce_core/threads/juce_TimeSliceThread.cpp +++ b/modules/juce_core/threads/juce_TimeSliceThread.cpp @@ -61,10 +61,10 @@ void TimeSliceThread::removeTimeSliceClient (TimeSliceClient* const client) const ScopedLock sl1 (listLock); // if there's a chance we're in the middle of calling this client, we need to - // also lock the outer lock.. + // also lock the outer lock if (clientBeingCalled == client) { - const ScopedUnlock ul (listLock); // unlock first to get the order right.. + const ScopedUnlock ul (listLock); // unlock first to get the order right const ScopedLock sl2 (callbackLock); const ScopedLock sl3 (listLock); diff --git a/modules/juce_core/time/juce_Time.cpp b/modules/juce_core/time/juce_Time.cpp index 0e7d324aaa..6fa9aa3e0f 100644 --- a/modules/juce_core/time/juce_Time.cpp +++ b/modules/juce_core/time/juce_Time.cpp @@ -142,7 +142,7 @@ namespace TimeHelpers } // There's no posix function that does a UTC version of mktime, - // so annoyingly we need to implement this manually.. + // so annoyingly we need to implement this manually. static int64 mktime_utc (const std::tm& t) noexcept { return 24 * 3600 * (daysFrom1970 (t.tm_year + 1900, t.tm_mon) + (t.tm_mday - 1)) @@ -244,9 +244,9 @@ uint32 Time::getMillisecondCounter() noexcept if (now < TimeHelpers::lastMSCounterValue.get()) { - // in multi-threaded apps this might be called concurrently, so + // In multi-threaded apps this might be called concurrently, so // make sure that our last counter value only increases and doesn't - // go backwards.. + // go backwards. if (now < TimeHelpers::lastMSCounterValue.get() - (uint32) 1000) TimeHelpers::lastMSCounterValue = now; } diff --git a/modules/juce_core/time/juce_Time.h b/modules/juce_core/time/juce_Time.h index 4b917443e5..fd150b94fa 100644 --- a/modules/juce_core/time/juce_Time.h +++ b/modules/juce_core/time/juce_Time.h @@ -293,7 +293,7 @@ public: static String getMonthName (int monthNumber, bool threeLetterVersion); //============================================================================== - // Static methods for getting system timers directly.. + // Static methods for getting system timers directly /** Returns the current system time. @@ -345,7 +345,7 @@ public: static uint32 getApproximateMillisecondCounter() noexcept; //============================================================================== - // High-resolution timers.. + // High-resolution timers /** Returns the current high-resolution counter's tick-count. diff --git a/modules/juce_core/unit_tests/juce_UnitTest.h b/modules/juce_core/unit_tests/juce_UnitTest.h index 4a4186becc..325e8182dd 100644 --- a/modules/juce_core/unit_tests/juce_UnitTest.h +++ b/modules/juce_core/unit_tests/juce_UnitTest.h @@ -62,7 +62,7 @@ class UnitTestRunner; expect (myOtherFoobar.doesSomething()); expect (myOtherFoobar.doesSomethingElse()); - ...etc.. + ...etc... } }; diff --git a/modules/juce_core/xml/juce_XmlDocument.cpp b/modules/juce_core/xml/juce_XmlDocument.cpp index 9f6ce5deb7..4d40e0b7c7 100644 --- a/modules/juce_core/xml/juce_XmlDocument.cpp +++ b/modules/juce_core/xml/juce_XmlDocument.cpp @@ -146,7 +146,7 @@ std::unique_ptr XmlDocument::getDocumentElement (const bool onlyRead if (CharPointer_UTF8::isByteOrderMark (text)) text += 3; - // parse the input buffer directly to avoid copying it all to a string.. + // parse the input buffer directly to avoid copying it all to a string return parseDocumentElement (String::CharPointerType (text), onlyReadOuterDocumentElement); } } @@ -257,7 +257,7 @@ bool XmlDocument::parseHeader() .trim(); /* If you load an XML document with a non-UTF encoding type, it may have been - loaded wrongly.. Since all the files are read via the normal juce file streams, + loaded wrongly. Since all the files are read via the normal juce file streams, they're treated as UTF-8, so by the time it gets to the parser, the encoding will have been lost. Best plan is to stick to utf-8 or if you have specific files to read, use your own code to convert them to a unicode String, and pass that to the @@ -437,14 +437,14 @@ XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements) skipNextWhiteSpace(); auto c = *input; - // empty tag.. + // empty tag if (c == '/' && input[1] == '>') { input += 2; break; } - // parse the guts of the element.. + // parse the guts of the element if (c == '>') { ++input; @@ -455,7 +455,7 @@ XmlElement* XmlDocument::readNextElement (const bool alsoParseSubElements) break; } - // get an attribute.. + // get an attribute if (XmlIdentifierChars::isIdentifierChar (c)) { auto attNameEnd = XmlIdentifierChars::findEndOfToken (input); @@ -521,7 +521,7 @@ void XmlDocument::readChildElements (XmlElement& parent) if (c1 == '/') { - // our close tag.. + // our close tag auto closeTag = input.indexOf ((juce_wchar) '>'); if (closeTag >= 0) @@ -558,7 +558,7 @@ void XmlDocument::readChildElements (XmlElement& parent) } else { - // this is some other element, so parse and add it.. + // this is some other element, so parse and add it if (auto* n = readNextElement (true)) childAppender.append (n); else @@ -861,7 +861,7 @@ String XmlDocument::expandExternalEntity (const String& entity) { auto ent = tokenisedDTD [i + 1].trimCharactersAtEnd (">").trim().unquoted(); - // check for sub-entities.. + // check for sub-entities auto ampersand = ent.indexOfChar ('&'); while (ampersand >= 0) diff --git a/modules/juce_core/xml/juce_XmlDocument.h b/modules/juce_core/xml/juce_XmlDocument.h index a052c436b1..1c9c7dc28c 100644 --- a/modules/juce_core/xml/juce_XmlDocument.h +++ b/modules/juce_core/xml/juce_XmlDocument.h @@ -48,7 +48,7 @@ namespace juce if (auto mainElement = myDocument.getDocumentElement()) { - ..use the element + use the element } else { @@ -56,7 +56,7 @@ namespace juce } @endcode - Or you can use the helper functions for much less verbose parsing.. + Or you can use the helper functions for much less verbose parsing. @code if (auto xml = parseXML (myXmlFile)) diff --git a/modules/juce_core/xml/juce_XmlElement.cpp b/modules/juce_core/xml/juce_XmlElement.cpp index 779b7e3059..fd6d4dc9c0 100644 --- a/modules/juce_core/xml/juce_XmlElement.cpp +++ b/modules/juce_core/xml/juce_XmlElement.cpp @@ -925,7 +925,7 @@ static const String& getJuceXmlTextContentAttributeName() const String& XmlElement::getText() const noexcept { jassert (isTextElement()); // you're trying to get the text from an element that - // isn't actually a text element.. If this contains text sub-nodes, you + // isn't actually a text element. If this contains text sub-nodes, you // probably want to use getAllSubText instead. return getStringAttribute (getJuceXmlTextContentAttributeName()); @@ -936,7 +936,7 @@ void XmlElement::setText (const String& newText) if (isTextElement()) setAttribute (getJuceXmlTextContentAttributeName(), newText); else - jassertfalse; // you can only change the text in a text element, not a normal one. + jassertfalse; // you can only change the text in a text element, not a normal one } String XmlElement::getAllSubText() const diff --git a/modules/juce_core/xml/juce_XmlElement.h b/modules/juce_core/xml/juce_XmlElement.h index d0d6427bf1..ba3d97f73a 100644 --- a/modules/juce_core/xml/juce_XmlElement.h +++ b/modules/juce_core/xml/juce_XmlElement.h @@ -103,15 +103,15 @@ struct XmlAttribute structure. Here's an example of parsing some elements: @code - // check we're looking at the right kind of document.. + // check we're looking at the right kind of document if (myElement->hasTagName ("ANIMALS")) { - // now we'll iterate its sub-elements looking for 'giraffe' elements.. + // now we'll iterate its sub-elements looking for 'giraffe' elements for (auto* e : myElement->getChildIterator()) { if (e->hasTagName ("GIRAFFE")) { - // found a giraffe, so use some of its attributes.. + // found a giraffe, so use some of its attributes String giraffeName = e->getStringAttribute ("name"); int giraffeAge = e->getIntAttribute ("age"); @@ -127,14 +127,14 @@ struct XmlAttribute for (int i = 0; i < numAnimals; ++i) { - // create an inner element.. + // create an inner element... XmlElement* giraffe = new XmlElement ("GIRAFFE"); giraffe->setAttribute ("name", "nigel"); giraffe->setAttribute ("age", 10); giraffe->setAttribute ("friendly", true); - // ..and add our new element to the parent node + // ...and add our new element to the parent node animalsList.addChildElement (giraffe); } @@ -289,7 +289,7 @@ public: const String& getAttributeValue (int attributeIndex) const noexcept; //============================================================================== - // Attribute-handling methods.. + // Attribute-handling methods /** Checks whether the element contains an attribute with a certain name. */ bool hasAttribute (StringRef attributeName) const noexcept; @@ -417,7 +417,7 @@ public: void removeAllAttributes() noexcept; //============================================================================== - // Child element methods.. + // Child element methods /** Returns the first of this element's sub-elements. see getNextElement() for an example of how to iterate the sub-elements. @@ -434,7 +434,7 @@ public: while (child != nullptr) { - ...do stuff with this child.. + ...do stuff with this child child = child->getNextElement(); } @@ -550,7 +550,7 @@ public: myParentElement->addChildElement (newElement); @endcode - ..you could just write this: + ...you could just write this: @code XmlElement* newElement = myParentElement->createNewChildElement ("foobar"); @endcode @@ -610,7 +610,7 @@ public: int compareElements (const XmlElement* first, const XmlElement* second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first @@ -968,7 +968,7 @@ private: forEachXmlChildElementWithTagName (*myParentXml, child, "MYTAG") { - // the child object is now guaranteed to be a element.. + // the child object is now guaranteed to be a element doSomethingWithMYTAGElement (child); } diff --git a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp index c8a0e4d8f5..b9537ec522 100644 --- a/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp +++ b/modules/juce_core/zip/juce_GZIPDecompressorInputStream.cpp @@ -310,7 +310,7 @@ bool GZIPDecompressorInputStream::setPosition (int64 newPos) { if (newPos < currentPos) { - // to go backwards, reset the stream and start again.. + // to go backwards, reset the stream and start again isEof = false; activeBufferSize = 0; currentPos = 0; diff --git a/modules/juce_core/zip/juce_ZipFile.cpp b/modules/juce_core/zip/juce_ZipFile.cpp index 12761a1fde..b21831dd83 100644 --- a/modules/juce_core/zip/juce_ZipFile.cpp +++ b/modules/juce_core/zip/juce_ZipFile.cpp @@ -282,7 +282,7 @@ ZipFile::~ZipFile() ZipFile::OpenStreamCounter::~OpenStreamCounter() { /* If you hit this assertion, it means you've created a stream to read one of the items in the - zipfile, but you've forgotten to delete that stream object before deleting the file.. + zipfile, but you've forgotten to delete that stream object before deleting the file. Streams can't be kept open after the file is deleted because they need to share the input stream that is managed by the ZipFile object. */ @@ -337,7 +337,7 @@ InputStream* ZipFile::createStreamForEntry (const int index) GZIPDecompressorInputStream::deflateFormat, zei->entry.uncompressedSize); - // (much faster to unzip in big blocks using a buffer..) + // much faster to unzip in big blocks using a buffer stream = new BufferedInputStream (stream, 32768, true); } } diff --git a/modules/juce_cryptography/encryption/juce_RSAKey.cpp b/modules/juce_cryptography/encryption/juce_RSAKey.cpp index f4349c8559..7acbc1b59b 100644 --- a/modules/juce_cryptography/encryption/juce_RSAKey.cpp +++ b/modules/juce_cryptography/encryption/juce_RSAKey.cpp @@ -48,7 +48,7 @@ RSAKey::RSAKey (const String& s) } else { - // the string needs to be two hex numbers, comma-separated.. + // the string needs to be two hex numbers, comma-separated jassertfalse; } } @@ -123,7 +123,7 @@ BigInteger RSAKey::findBestCommonDivisor (const BigInteger& p, const BigInteger& void RSAKey::createKeyPair (RSAKey& publicKey, RSAKey& privateKey, const int numBits, const int* randomSeeds, const int numRandomSeeds) { - jassert (numBits > 16); // not much point using less than this.. + jassert (numBits > 16); // not much point using less than this jassert (numRandomSeeds == 0 || numRandomSeeds >= 2); // you need to provide plenty of seeds here! BigInteger p (Primes::createProbablePrime (numBits / 2, 30, randomSeeds, numRandomSeeds / 2)); diff --git a/modules/juce_cryptography/encryption/juce_RSAKey.h b/modules/juce_cryptography/encryption/juce_RSAKey.h index c52474fe87..79eeeda055 100644 --- a/modules/juce_cryptography/encryption/juce_RSAKey.h +++ b/modules/juce_cryptography/encryption/juce_RSAKey.h @@ -67,7 +67,7 @@ namespace juce } @endcode - ..or in Java with something like this: + ...or in Java with something like this: @code public class RSAKey diff --git a/modules/juce_cryptography/hashing/juce_MD5.cpp b/modules/juce_cryptography/hashing/juce_MD5.cpp index 410da8fb33..ca8e4d930a 100644 --- a/modules/juce_cryptography/hashing/juce_MD5.cpp +++ b/modules/juce_cryptography/hashing/juce_MD5.cpp @@ -132,7 +132,7 @@ struct MD5Generator auto index = (count[0] >> 3) & 0x3f; auto paddingLength = (index < 56 ? 56 : 120) - index; - uint8_t paddingBuffer[64] = { 0x80 }; // first byte is 0x80, remaining bytes are zero. + uint8_t paddingBuffer[64] = { 0x80 }; // first byte is 0x80, remaining bytes are zero processBlock (paddingBuffer, (size_t) paddingLength); processBlock (encodedLength, 8); diff --git a/modules/juce_cryptography/hashing/juce_SHA256.cpp b/modules/juce_cryptography/hashing/juce_SHA256.cpp index 63bf1813fe..72c6c8a3e0 100644 --- a/modules/juce_cryptography/hashing/juce_SHA256.cpp +++ b/modules/juce_cryptography/hashing/juce_SHA256.cpp @@ -95,10 +95,10 @@ struct SHA256Processor finalBlocks[numBytes++] = 128; // append a '1' bit while (numBytes != 56 && numBytes < 64 + 56) - finalBlocks[numBytes++] = 0; // pad with zeros.. + finalBlocks[numBytes++] = 0; // pad with zeros for (int i = 8; --i >= 0;) - finalBlocks[numBytes++] = (uint8_t) (length >> (i * 8)); // append the length. + finalBlocks[numBytes++] = (uint8_t) (length >> (i * 8)); // append the length jassert (numBytes == 64 || numBytes == 128); diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp index 2ccbcc34df..749e8b8e6b 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.cpp @@ -59,7 +59,7 @@ PropertiesFile::Options::Options() File PropertiesFile::Options::getDefaultFile() const { - // mustn't have illegal characters in this name.. + // mustn't have illegal characters in this name jassert (applicationName == File::createLegalFileName (applicationName)); #if JUCE_MAC || JUCE_IOS @@ -82,7 +82,7 @@ File PropertiesFile::Options::getDefaultFile() const If your app needs to load settings files that were created by older versions of juce and you want to maintain backwards-compatibility, then you can set this to "Preferences". - But.. for better Apple-compliance, the recommended approach would be to write some code that + But, for better Apple-compliance, the recommended approach would be to write some code that finds your old settings files in ~/Library/Preferences, moves them to ~/Library/Application Support, and then uses the new path. */ @@ -140,7 +140,7 @@ bool PropertiesFile::reload() ProcessScopedLock pl (createProcessLock()); if (pl != nullptr && ! pl->isLocked()) - return false; // locking failure.. + return false; // locking failure loadedOk = (! file.exists()) || loadAsBinary() || loadAsXml(); return loadedOk; @@ -223,7 +223,7 @@ bool PropertiesFile::saveAsXml() auto* e = doc.createNewChildElement (PropertyFileConstants::valueTag); e->setAttribute (PropertyFileConstants::nameAttribute, props.getAllKeys() [i]); - // if the value seems to contain xml, store it as such.. + // if the value seems to contain xml, store it as such if (auto childElement = parseXML (props.getAllValues() [i])) e->addChildElement (childElement.release()); else @@ -233,7 +233,7 @@ bool PropertiesFile::saveAsXml() ProcessScopedLock pl (createProcessLock()); if (pl != nullptr && ! pl->isLocked()) - return false; // locking failure.. + return false; // locking failure if (doc.writeTo (file, {})) { @@ -290,7 +290,7 @@ bool PropertiesFile::saveAsBinary() ProcessScopedLock pl (createProcessLock()); if (pl != nullptr && ! pl->isLocked()) - return false; // locking failure.. + return false; // locking failure TemporaryFile tempFile (file); diff --git a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h index 9764d93629..b56a267876 100644 --- a/modules/juce_data_structures/app_properties/juce_PropertiesFile.h +++ b/modules/juce_data_structures/app_properties/juce_PropertiesFile.h @@ -106,7 +106,7 @@ public: If your app needs to load settings files that were created by older versions of juce and you want to maintain backwards-compatibility, then you can set this to "Preferences". - But.. for better Apple-compliance, the recommended approach would be to write some code that + But, for better Apple-compliance, the recommended approach would be to write some code that finds your old settings files in ~/Library/Preferences, moves them to ~/Library/Application Support, and then uses the new path. */ diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index b0df154664..22631f16b6 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -258,8 +258,8 @@ public: if (child != this && ! isAChildOf (child)) { // You should always make sure that a child is removed from its previous parent before - // adding it somewhere else - otherwise, it's ambiguous as to whether a different - // undomanager should be used when removing it from its current parent.. + // adding it somewhere else - otherwise, it's ambiguous whether a different + // undomanager should be used when removing it from its current parent. jassert (child->parent == nullptr); if (child->parent != nullptr) diff --git a/modules/juce_data_structures/values/juce_ValueTree.h b/modules/juce_data_structures/values/juce_ValueTree.h index f2da0c413d..07a7894f02 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.h +++ b/modules/juce_data_structures/values/juce_ValueTree.h @@ -585,7 +585,7 @@ public: int compareElements (const ValueTree& first, const ValueTree& second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first diff --git a/modules/juce_events/messages/juce_ApplicationBase.cpp b/modules/juce_events/messages/juce_ApplicationBase.cpp index 0dc5e6c0f6..9691121c7b 100644 --- a/modules/juce_events/messages/juce_ApplicationBase.cpp +++ b/modules/juce_events/messages/juce_ApplicationBase.cpp @@ -47,7 +47,7 @@ void JUCEApplicationBase::setApplicationReturnValue (const int newReturnValue) n appReturnValue = newReturnValue; } -// This is called on the Mac and iOS where the OS doesn't allow the stack to unwind on shutdown.. +// This is called on the Mac and iOS where the OS doesn't allow the stack to unwind on shutdown. void JUCEApplicationBase::appWillTerminateByForce() { JUCE_AUTORELEASEPOOL @@ -273,7 +273,7 @@ int JUCEApplicationBase::main() JUCE_TRY { - // loop until a quit message is received.. + // loop until a quit message is received MessageManager::getInstance()->runDispatchLoop(); } JUCE_CATCH_EXCEPTION @@ -297,7 +297,7 @@ bool JUCEApplicationBase::initialiseApp() #if JUCE_WINDOWS && (! defined (_CONSOLE)) if (isStandaloneApp() && AttachConsole (ATTACH_PARENT_PROCESS) != 0) { - // if we've launched a GUI app from cmd.exe or PowerShell, we need this to enable printf etc. + // If we've launched a GUI app from cmd.exe or PowerShell, we need this to enable printf etc. // However, only reassign stdout, stderr, stdin if they have not been already opened by // a redirect or similar. FILE* ignore; @@ -308,7 +308,7 @@ bool JUCEApplicationBase::initialiseApp() } #endif - // let the app do its setting-up.. + // let the app do its setting-up initialise (getCommandLineParameters()); stillInitialising = false; @@ -335,7 +335,7 @@ int JUCEApplicationBase::shutdownApp() JUCE_TRY { - // give the app a chance to clean up.. + // give the app a chance to clean up shutdown(); } JUCE_CATCH_EXCEPTION diff --git a/modules/juce_events/messages/juce_DeletedAtShutdown.cpp b/modules/juce_events/messages/juce_DeletedAtShutdown.cpp index b1f4f937d3..d3438cfdcf 100644 --- a/modules/juce_events/messages/juce_DeletedAtShutdown.cpp +++ b/modules/juce_events/messages/juce_DeletedAtShutdown.cpp @@ -76,7 +76,7 @@ void DeletedAtShutdown::deleteAll() { auto* deletee = localCopy.getUnchecked (i); - // double-check that it's not already been deleted during another object's destructor. + // double-check that it's not already been deleted during another object's destructor { const SpinLock::ScopedLockType sl (deletedAtShutdownLock); diff --git a/modules/juce_events/messages/juce_MessageManager.h b/modules/juce_events/messages/juce_MessageManager.h index 762c98df66..2dbe92030f 100644 --- a/modules/juce_events/messages/juce_MessageManager.h +++ b/modules/juce_events/messages/juce_MessageManager.h @@ -193,14 +193,14 @@ public: /** Called to tell the manager that the current thread is the one that's running the dispatch loop. - (Best to ignore this method unless you really know what you're doing..) + (Best to ignore this method unless you really know what you're doing.) @see getCurrentMessageThread */ void setCurrentThreadAsMessageThread(); /** Returns the ID of the current message thread, as set by setCurrentThreadAsMessageThread(). - (Best to ignore this method unless you really know what you're doing..) + (Best to ignore this method unless you really know what you're doing.) @see setCurrentThreadAsMessageThread */ Thread::ThreadID getCurrentMessageThread() const noexcept { return messageThreadId; } @@ -448,12 +448,12 @@ private: someData = 1234; const MessageManagerLock mmLock; - // the event loop will now be locked so it's safe to make a few calls.. + // the event loop will now be locked so it's safe to make a few calls myComponent->setBounds (newBounds); myComponent->repaint(); - // ..the event loop will now be unlocked as the MessageManagerLock goes out of scope + // the event loop will now be unlocked as the MessageManagerLock goes out of scope } @endcode @@ -466,7 +466,7 @@ private: Another caveat is that using this in conjunction with other CriticalSections can create lots of interesting ways of producing a deadlock! In particular, if your message thread calls stopThread() for a thread that uses these locks, - you'll get an (occasional) deadlock.. + you'll get an (occasional) deadlock. @see MessageManager, MessageManager::currentThreadHasLockedMessageManager @@ -509,10 +509,10 @@ public: if (! mml.lockWasGained()) return; // another thread is trying to kill us! - ..do some locked stuff here.. + ...do some locked stuff here... } - ..and now the MM is now unlocked.. + ...and now the MM is now unlocked... } @endcode diff --git a/modules/juce_events/native/juce_MessageManager_ios.mm b/modules/juce_events/native/juce_MessageManager_ios.mm index 035f3e8b01..472a975317 100644 --- a/modules/juce_events/native/juce_MessageManager_ios.mm +++ b/modules/juce_events/native/juce_MessageManager_ios.mm @@ -54,7 +54,7 @@ void MessageManager::stopDispatchLoop() if (! SystemStats::isRunningInAppExtensionSandbox()) [[[UIApplication sharedApplication] delegate] applicationWillTerminate: [UIApplication sharedApplication]]; - exit (0); // iOS apps get no mercy.. + exit (0); // iOS apps get no mercy } #if JUCE_MODAL_LOOPS_PERMITTED diff --git a/modules/juce_events/native/juce_MessageManager_mac.mm b/modules/juce_events/native/juce_MessageManager_mac.mm index 0777966433..e8d003c2f7 100644 --- a/modules/juce_events/native/juce_MessageManager_mac.mm +++ b/modules/juce_events/native/juce_MessageManager_mac.mm @@ -322,7 +322,7 @@ public: //============================================================================== void MessageManager::runDispatchLoop() { - if (quitMessagePosted.get() == 0) // check that the quit message wasn't already posted.. + if (quitMessagePosted.get() == 0) // check that the quit message wasn't already posted { JUCE_AUTORELEASEPOOL { diff --git a/modules/juce_events/native/juce_Messaging_windows.cpp b/modules/juce_events/native/juce_Messaging_windows.cpp index ae63683282..d24de9862e 100644 --- a/modules/juce_events/native/juce_Messaging_windows.cpp +++ b/modules/juce_events/native/juce_Messaging_windows.cpp @@ -140,7 +140,7 @@ public: && ! JuceWindowIdentifier::isJUCEWindow (m.hwnd)) { // if it's someone else's window being clicked on, and the focus is - // currently on a juce window, pass the kb focus over.. + // currently on a juce window, pass the kb focus over auto currentFocus = GetFocus(); if (currentFocus == nullptr || JuceWindowIdentifier::isJUCEWindow (currentFocus)) diff --git a/modules/juce_events/timers/juce_Timer.cpp b/modules/juce_events/timers/juce_Timer.cpp index 5f059547c7..ce45c31faa 100644 --- a/modules/juce_events/timers/juce_Timer.cpp +++ b/modules/juce_events/timers/juce_Timer.cpp @@ -121,7 +121,7 @@ public: { if (callbackArrived.wait (0)) { - // already a message in flight - do nothing.. + // already a message in flight - do nothing } else { diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.cpp b/modules/juce_graphics/geometry/juce_AffineTransform.cpp index a77d49416a..cfeef2bf9d 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.cpp +++ b/modules/juce_graphics/geometry/juce_AffineTransform.cpp @@ -211,7 +211,7 @@ AffineTransform AffineTransform::inverted() const noexcept dst10, dst11, -mat02 * dst10 - mat12 * dst11 }; } - // singularity.. + // singularity return *this; } diff --git a/modules/juce_graphics/geometry/juce_EdgeTable.cpp b/modules/juce_graphics/geometry/juce_EdgeTable.cpp index 4ea31e6766..e455d1c8fe 100644 --- a/modules/juce_graphics/geometry/juce_EdgeTable.cpp +++ b/modules/juce_graphics/geometry/juce_EdgeTable.cpp @@ -316,7 +316,7 @@ void EdgeTable::clearLineSizes() noexcept void EdgeTable::sanitiseLevels (const bool useNonZeroWinding) noexcept { - // Convert the table from relative windings to absolute levels.. + // convert the table from relative windings to absolute levels int* lineStart = table.data(); for (int y = bounds.getHeight(); --y >= 0;) diff --git a/modules/juce_graphics/geometry/juce_EdgeTable.h b/modules/juce_graphics/geometry/juce_EdgeTable.h index 8f7893547a..21ae3d9953 100644 --- a/modules/juce_graphics/geometry/juce_EdgeTable.h +++ b/modules/juce_graphics/geometry/juce_EdgeTable.h @@ -138,7 +138,7 @@ public: if (endOfRun == (x / scale)) { // small segment within the same pixel, so just save it for the next - // time round.. + // time round levelAccumulator += (endX - x) * level; } else @@ -157,7 +157,7 @@ public: iterationCallback.handleEdgeTablePixel (x, static_cast (levelAccumulator)); } - // if there's a run of similar pixels, do it all in one go.. + // if there's a run of similar pixels, do it all in one go if (level > 0) { jassert (endOfRun <= bounds.getRight()); @@ -167,7 +167,7 @@ public: iterationCallback.handleEdgeTableLine (x, numPix, static_cast (level)); } - // save the bit at the end to be drawn next time round the loop. + // save the bit at the end to be drawn next time round the loop levelAccumulator = (endX & 0xff) * level; } diff --git a/modules/juce_graphics/geometry/juce_Path.cpp b/modules/juce_graphics/geometry/juce_Path.cpp index 5efd49da68..757fb5262b 100644 --- a/modules/juce_graphics/geometry/juce_Path.cpp +++ b/modules/juce_graphics/geometry/juce_Path.cpp @@ -605,7 +605,7 @@ void Path::addArrow (Line line, float lineThickness, void Path::addPolygon (Point centre, int numberOfSides, float radius, float startAngle) { - jassert (numberOfSides > 1); // this would be silly. + jassert (numberOfSides > 1); // this would be silly if (numberOfSides > 1) { @@ -629,7 +629,7 @@ void Path::addPolygon (Point centre, int numberOfSides, void Path::addStar (Point centre, int numberOfPoints, float innerRadius, float outerRadius, float startAngle) { - jassert (numberOfPoints > 1); // this would be silly. + jassert (numberOfPoints > 1); // this would be silly if (numberOfPoints > 1) { diff --git a/modules/juce_graphics/geometry/juce_Path.h b/modules/juce_graphics/geometry/juce_Path.h index 3bcbe48958..9f5f85995a 100644 --- a/modules/juce_graphics/geometry/juce_Path.h +++ b/modules/juce_graphics/geometry/juce_Path.h @@ -52,13 +52,13 @@ namespace juce myPath.quadraticTo (0.0f, 150.0f, 5.0f, 50.0f); // draw a curve that ends at (5, 50) myPath.closeSubPath(); // close the subpath with a line back to (10, 10) - // add an ellipse as well, which will form a second sub-path within the path.. + // add an ellipse as well, which will form a second sub-path within the path myPath.addEllipse (50.0f, 50.0f, 40.0f, 30.0f); - // double the width of the whole thing.. + // double the width of the whole thing myPath.applyTransform (AffineTransform::scale (2.0f, 1.0f)); - // and draw it to a graphics context with a 5-pixel thick outline. + // and draw it to a graphics context with a 5-pixel thick outline g.strokePath (myPath, PathStrokeType (5.0f)); @endcode diff --git a/modules/juce_graphics/geometry/juce_PathStrokeType.cpp b/modules/juce_graphics/geometry/juce_PathStrokeType.cpp index 15967990c6..031e5d6474 100644 --- a/modules/juce_graphics/geometry/juce_PathStrokeType.cpp +++ b/modules/juce_graphics/geometry/juce_PathStrokeType.cpp @@ -222,7 +222,7 @@ namespace PathStrokeHelpers { const auto intersection = lineIntersection (x1, y1, x2, y2, x3, y3, x4, y4); - // if they intersect, use this point.. + // if they intersect, use this point if (intersection.intersects) { destPath.lineTo (intersection.point); diff --git a/modules/juce_graphics/geometry/juce_RectangleList.h b/modules/juce_graphics/geometry/juce_RectangleList.h index 5213e76bc1..7e1ed41fa0 100644 --- a/modules/juce_graphics/geometry/juce_RectangleList.h +++ b/modules/juce_graphics/geometry/juce_RectangleList.h @@ -483,7 +483,7 @@ public: auto jry2 = jry1 + r2.getHeight(); // if the vertical edges of any blocks are touching and their horizontals don't - // line up, split them horizontally.. + // line up, split them horizontally if (jrx1 == rx2 || jrx2 == rx1) { if (jry1 > ry1 && jry1 < ry2) diff --git a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp index 172868661f..8eaa1f598a 100644 --- a/modules/juce_graphics/image_formats/juce_PNGLoader.cpp +++ b/modules/juce_graphics/image_formats/juce_PNGLoader.cpp @@ -358,7 +358,7 @@ namespace PNGHelpers { if (setjmp (errorJumpBuf) == 0) { - // read the header.. + // read the header png_set_read_fn (pngReadStruct, &in, readCallback); png_read_info (pngReadStruct, pngInfoStruct); @@ -407,7 +407,7 @@ namespace PNGHelpers static Image createImageFromData (bool hasAlphaChan, int width, int height, png_bytepp rows) { - // now convert the data to a juce image format.. + // now convert the data to a juce image format Image image (hasAlphaChan ? Image::ARGB : Image::RGB, width, height, hasAlphaChan); image.getProperties()->set ("originalImageHadAlpha", image.hasAlphaChannel()); @@ -455,7 +455,7 @@ namespace PNGHelpers if (readHeader (in, pngReadStruct, pngInfoStruct, errorJumpBuf, width, height, bitDepth, colorType, interlaceType)) { - // Load the image into a temp buffer.. + // load the image into a temp buffer const size_t lineStride = width * 4; HeapBlock tempBuffer (height * lineStride); HeapBlock rows (height); diff --git a/modules/juce_graphics/images/juce_Image.h b/modules/juce_graphics/images/juce_Image.h index 89b9354c94..a68c61f6c1 100644 --- a/modules/juce_graphics/images/juce_Image.h +++ b/modules/juce_graphics/images/juce_Image.h @@ -48,12 +48,12 @@ class ImagePixelData; To draw into an image, create a Graphics object for it. e.g. @code - // create a transparent 500x500 image.. + // create a transparent 500x500 image Image myImage (Image::RGB, 500, 500, true); Graphics g (myImage); g.setColour (Colours::red); - g.fillEllipse (20, 20, 300, 200); // draws a red ellipse in our image. + g.fillEllipse (20, 20, 300, 200); // draws a red ellipse in our image @endcode Other useful ways to create an image are with the ImageCache class, or the diff --git a/modules/juce_graphics/images/juce_ImageCache.cpp b/modules/juce_graphics/images/juce_ImageCache.cpp index d37c5a8190..5714c42d3b 100644 --- a/modules/juce_graphics/images/juce_ImageCache.cpp +++ b/modules/juce_graphics/images/juce_ImageCache.cpp @@ -93,7 +93,7 @@ struct ImageCache::Pimpl : private Timer, } else { - item.lastUseTime = now; // multiply-referenced, so this image is still in use. + item.lastUseTime = now; // multiply-referenced, so this image is still in use } } diff --git a/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm b/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm index f3a6b22322..ef5c31f67b 100644 --- a/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm +++ b/modules/juce_graphics/native/juce_CoreGraphicsContext_mac.mm @@ -1140,7 +1140,7 @@ Image juce_loadWithCoreImage (InputStream& input) if (context == nullptr) { - // if USE_COREGRAPHICS_RENDERING is set, the CoreGraphicsPixelData class should have been used. + // if USE_COREGRAPHICS_RENDERING is set, the CoreGraphicsPixelData class should have been used jassertfalse; return {}; } diff --git a/modules/juce_graphics/native/juce_RenderingHelpers.h b/modules/juce_graphics/native/juce_RenderingHelpers.h index 5289b8669a..9b57cf84d3 100644 --- a/modules/juce_graphics/native/juce_RenderingHelpers.h +++ b/modules/juce_graphics/native/juce_RenderingHelpers.h @@ -615,7 +615,7 @@ namespace EdgeTableFillers forcedinline void replaceLine (PixelRGB* dest, PixelARGB colour, int width) const noexcept { if ((size_t) destData.pixelStride == sizeof (*dest) && areRGBComponentsEqual) - memset ((void*) dest, colour.getRed(), (size_t) width * 3); // if all the component values are the same, we can cheat.. + memset ((void*) dest, colour.getRed(), (size_t) width * 3); // if all the component values are the same, we can cheat else JUCE_PERFORM_PIXEL_OP_LOOP (set (colour)); } @@ -1003,7 +1003,7 @@ namespace EdgeTableFillers { if (isPositiveAndBelow (loResY, maxY)) { - // In the centre of the image.. + // in the centre of the image render4PixelAverage (dest, this->srcData.getPixelPointer (loResX, loResY), hiResX & 255, hiResY & 255); ++dest; @@ -1012,7 +1012,7 @@ namespace EdgeTableFillers if (! repeatPattern) { - // At a top or bottom edge.. + // at a top or bottom edge if (loResY < 0) render2PixelAverageX (dest, this->srcData.getPixelPointer (loResX, 0), hiResX & 255); else @@ -1026,7 +1026,7 @@ namespace EdgeTableFillers { if (isPositiveAndBelow (loResY, maxY) && ! repeatPattern) { - // At a left or right hand edge.. + // at a left or right hand edge if (loResX < 0) render2PixelAverageY (dest, this->srcData.getPixelPointer (0, loResY), hiResY & 255); else @@ -1622,7 +1622,7 @@ namespace ClipRegions if (transform.isOnlyTranslation()) { - // If our translation doesn't involve any distortion, just use a simple blit.. + // if our translation doesn't involve any distortion, just use a simple blit auto tx = (int) (transform.getTranslationX() * 256.0f); auto ty = (int) (transform.getTranslationY() * 256.0f); @@ -2302,7 +2302,7 @@ public: if (isOnlyTranslationAllowingError (t, 0.002f)) { - // If our translation doesn't involve any distortion, just use a simple blit.. + // if our translation doesn't involve any distortion, just use a simple blit auto tx = (int) (t.getTranslationX() * 256.0f); auto ty = (int) (t.getTranslationY() * 256.0f); @@ -2367,7 +2367,7 @@ public: if (isIdentity) { - // If our translation doesn't involve any distortion, we can speed it up.. + // if our translation doesn't involve any distortion, we can speed it up g2.point1.applyTransform (t); g2.point2.applyTransform (t); t = {}; diff --git a/modules/juce_gui_basics/buttons/juce_Button.cpp b/modules/juce_gui_basics/buttons/juce_Button.cpp index d06fd225e7..102e50c318 100644 --- a/modules/juce_gui_basics/buttons/juce_Button.cpp +++ b/modules/juce_gui_basics/buttons/juce_Button.cpp @@ -707,7 +707,7 @@ void Button::repeatTimerCallback() auto now = Time::getMillisecondCounter(); - // if we've been blocked from repeating often enough, speed up the repeat timer to compensate.. + // if we've been blocked from repeating often enough, speed up the repeat timer to compensate if (lastRepeatTime != 0 && (int) (now - lastRepeatTime) > repeatSpeed * 2) repeatSpeed = jmax (1, repeatSpeed / 2); diff --git a/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp b/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp index c754ec8a36..40e8f5b8f4 100644 --- a/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp +++ b/modules/juce_gui_basics/buttons/juce_DrawableButton.cpp @@ -62,7 +62,7 @@ void DrawableButton::setImages (const Drawable* normal, const Drawable* downOn, const Drawable* disabledOn) { - jassert (normal != nullptr); // you really need to give it at least a normal image.. + jassert (normal != nullptr); // you really need to give it at least a normal image normalImage = copyDrawableIfNotNull (normal); overImage = copyDrawableIfNotNull (over); diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp index 56818d28e8..7a0750a054 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp @@ -192,7 +192,7 @@ bool ApplicationCommandManager::invokeDirectly (CommandID commandID, bool asynch bool ApplicationCommandManager::invoke (const ApplicationCommandTarget::InvocationInfo& inf, bool asynchronously) { // This call isn't thread-safe for use from a non-UI thread without locking the message - // manager first.. + // manager first. JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED bool ok = false; @@ -276,7 +276,7 @@ ApplicationCommandTarget* ApplicationCommandManager::findDefaultComponentTarget( { auto& desktop = Desktop::getInstance(); - // getting a bit desperate now: try all desktop comps.. + // getting a bit desperate now: try all desktop comps... for (int i = desktop.getNumComponents(); --i >= 0;) if (auto* component = desktop.getComponent (i)) if (detail::WindowingHelpers::isForegroundOrEmbeddedProcess (component)) diff --git a/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp b/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp index 36e479a31b..5d6aac3bc4 100644 --- a/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp +++ b/modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp @@ -74,7 +74,7 @@ bool ApplicationCommandTarget::tryToInvoke (const InvocationInfo& info, const bo if (perform (info)) return true; - // Hmm.. your target claimed that it could perform this command, but failed to do so. + // Your target claimed that it could perform this command, but failed to do so. // If it can't do it at the moment for some reason, it should clear the 'isActive' flag // when it returns the command's info. jassertfalse; diff --git a/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.h b/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.h index d4289b4276..32ee607cfe 100644 --- a/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.h +++ b/modules/juce_gui_basics/commands/juce_KeyPressMappingSet.h @@ -60,7 +60,7 @@ namespace juce myCommandManager = new ApplicationCommandManager(); // first, make sure the command manager has registered all the commands that its - // targets can perform.. + // targets can perform myCommandManager->registerAllCommandsForTarget (myCommandTarget1); myCommandManager->registerAllCommandsForTarget (myCommandTarget2); diff --git a/modules/juce_gui_basics/components/juce_Component.cpp b/modules/juce_gui_basics/components/juce_Component.cpp index 77f35d345c..22a7623d36 100644 --- a/modules/juce_gui_basics/components/juce_Component.cpp +++ b/modules/juce_gui_basics/components/juce_Component.cpp @@ -574,7 +574,7 @@ void Component::addToDesktop (int styleWanted, void* nativeWindowToAttachTo) flags.hasHeavyweightPeerFlag = false; Desktop::getInstance().removeDesktopComponent (this); - internalHierarchyChanged(); // give comps a chance to react to the peer change before the old peer is deleted. + internalHierarchyChanged(); // give comps a chance to react to the peer change before the old peer is deleted if (safePointer == nullptr) return; @@ -824,7 +824,7 @@ void Component::toBehind (Component* other) { if (other != nullptr && other != this) { - // the two components must belong to the same parent.. + // the two components must belong to the same parent jassert (parentComponent == other->parentComponent); if (parentComponent != nullptr) @@ -986,7 +986,7 @@ void Component::setBounds (int x, int y, int w, int h) if (showing) { - // send a fake mouse move to trigger enter/exit messages if needed.. + // send a fake mouse move to trigger enter/exit messages if needed sendFakeMouseMove(); if (! flags.hasHeavyweightPeerFlag) @@ -1549,7 +1549,7 @@ void Component::internalHierarchyChanged() if (checker.shouldBailOut()) { // you really shouldn't delete the parent component during a callback telling you - // that it's changed.. + // that it's changed jassertfalse; return; } @@ -1920,7 +1920,7 @@ void Component::paintEntireComponent (Graphics& g, bool ignoreAlphaLevel, Opaque { // If sizing a top-level-window and the OS paint message is delivered synchronously // before resized() is called, then we'll invoke the callback here, to make sure - // the components inside have had a chance to sort their sizes out.. + // the components inside have had a chance to sort their sizes out. #if JUCE_DEBUG if (! flags.isInsidePaintCall) // (avoids an assertion in plugins hosted in WaveLab) #endif @@ -2370,10 +2370,10 @@ void Component::internalMouseDown (SafePointer target, return; // If processing the input attempt has exited the modal loop, we'll allow the event - // to be delivered.. + // to be delivered. if (target->isCurrentlyBlockedByAnotherModalComponent()) { - // allow blocked mouse-events to go to global listeners.. + // allow blocked mouse-events to go to global listeners desktop.getMouseListeners().callChecked (checker, [&] (MouseListener& l) { l.mouseDown (checker.eventWithNearestParent()); }); return; } @@ -2500,7 +2500,7 @@ void Component::internalMouseMove (SafePointer target, MouseInputSour if (target->isCurrentlyBlockedByAnotherModalComponent()) { - // allow blocked mouse-events to go to global listeners.. + // allow blocked mouse-events to go to global listeners desktop.sendMouseMove(); } else @@ -2548,7 +2548,7 @@ void Component::internalMouseWheel (SafePointer target, MouseInputSou if (target->isCurrentlyBlockedByAnotherModalComponent()) { - // allow blocked mouse-events to go to global listeners.. + // allow blocked mouse-events to go to global listeners desktop.mouseListeners.callChecked (checker, [&] (MouseListener& l) { l.mouseWheelMove (me, wheel); }); } else @@ -2585,7 +2585,7 @@ void Component::internalMagnifyGesture (SafePointer target, MouseInpu if (target->isCurrentlyBlockedByAnotherModalComponent()) { - // allow blocked mouse-events to go to global listeners.. + // allow blocked mouse-events to go to global listeners desktop.mouseListeners.callChecked (checker, [&] (MouseListener& l) { l.mouseMagnify (me, amount); }); } else @@ -2640,7 +2640,7 @@ void Component::internalBroughtToFront() return; // When brought to the front and there's a modal component blocking this one, - // we need to bring the modal one to the front instead.. + // we need to bring the modal one to the front instead. if (auto* cm = getCurrentlyModalComponent()) if (cm->getTopLevelComponent() != getTopLevelComponent()) ModalComponentManager::getInstance()->bringModalComponentsToFront (false); // very important that this is false, otherwise in Windows, diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.h b/modules/juce_gui_basics/components/juce_ModalComponentManager.h index cafed82074..2a7c80a422 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.h +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.h @@ -277,7 +277,7 @@ public: E.g. @code static void myCallbackFunction (int modalResult, Slider* mySlider) { - if (modalResult == 1 && mySlider != nullptr) // (must check that mySlider isn't null in case it was deleted..) + if (modalResult == 1 && mySlider != nullptr) // must check that mySlider isn't null in case it was deleted mySlider->setValue (0.0); } @@ -310,7 +310,7 @@ public: E.g. @code static void myCallbackFunction (int modalResult, Slider* mySlider, String customParam) { - if (modalResult == 1 && mySlider != nullptr) // (must check that mySlider isn't null in case it was deleted..) + if (modalResult == 1 && mySlider != nullptr) // must check that mySlider isn't null in case it was deleted mySlider->setName (customParam); } diff --git a/modules/juce_gui_basics/detail/juce_MouseInputSourceImpl.h b/modules/juce_gui_basics/detail/juce_MouseInputSourceImpl.h index 8050933795..814e2fefdb 100644 --- a/modules/juce_gui_basics/detail/juce_MouseInputSourceImpl.h +++ b/modules/juce_gui_basics/detail/juce_MouseInputSourceImpl.h @@ -221,7 +221,7 @@ public: sendMouseUp (*current, pointerState.withPositionOffset (unboundedMouseOffset), time, oldMods); if (lastCounter != mouseEventCounter) - return true; // if a modal loop happened, then newButtonState is no longer valid. + return true; // if a modal loop happened, then newButtonState is no longer valid } enableUnboundedMouseMovement (false, false); diff --git a/modules/juce_gui_basics/detail/juce_MouseInputSourceList.h b/modules/juce_gui_basics/detail/juce_MouseInputSourceList.h index fe58555e35..527620b8d6 100644 --- a/modules/juce_gui_basics/detail/juce_MouseInputSourceList.h +++ b/modules/juce_gui_basics/detail/juce_MouseInputSourceList.h @@ -139,7 +139,7 @@ public: for (auto* s : sources) { // NB: when doing auto-repeat, we need to force an update of the current position and button state, - // because on some OSes the queue can get overloaded with messages so that mouse-events don't get through.. + // because on some OSes the queue can get overloaded with messages so that mouse-events don't get through. if (s->isDragging() && ComponentPeer::getCurrentModifiersRealtime().isAnyMouseButtonDown()) { s->lastPointerState.position = s->getRawScreenPosition(); diff --git a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp index 6ef3fa9f4a..4501c6c451 100644 --- a/modules/juce_gui_basics/drawables/juce_SVGParser.cpp +++ b/modules/juce_gui_basics/drawables/juce_SVGParser.cpp @@ -440,7 +440,7 @@ public: } // paths that finish back at their start position often seem to be - // left without a 'z', so need to be closed explicitly.. + // left without a 'z', so need to be closed explicitly if (path.getCurrentPosition() == subpathStart) path.closeSubPath(); } @@ -926,7 +926,7 @@ private: auto radius = getCoordLength (fillXml->getStringAttribute ("r", "50%"), gradientWidth); gradient.point2 = gradient.point1 + Point (radius, 0.0f); - //xxx (the fx, fy focal point isn't handled properly here..) + //xxx (the fx, fy focal point isn't handled properly here) } else { diff --git a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp index 40d2a143cd..bc62a14903 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileBrowserComponent.cpp @@ -48,11 +48,11 @@ FileBrowserComponent::FileBrowserComponent (int flags_, thread (SystemStats::getJUCEVersion() + ": FileBrowser"), wasProcessActive (true) { - // You need to specify one or other of the open/save flags.. + // You need to specify one or other of the open/save flags. jassert ((flags & (saveMode | openMode)) != 0); jassert ((flags & (saveMode | openMode)) != (saveMode | openMode)); - // You need to specify at least one of these flags.. + // You need to specify at least one of these flags. jassert ((flags & (canSelectFiles | canSelectDirectories)) != 0); String filename; diff --git a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp index 5290ebe821..0cda08a6f7 100644 --- a/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_FileChooser.cpp @@ -205,7 +205,7 @@ std::shared_ptr FileChooser::createPimpl (int flags, FilePre { results.clear(); - // the preview component needs to be the right size before you pass it in here.. + // the preview component needs to be the right size before you pass it in here jassert (previewComp == nullptr || (previewComp->getWidth() > 10 && previewComp->getHeight() > 10)); diff --git a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp index 7fc848305d..6f00e844d1 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp +++ b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp @@ -204,7 +204,7 @@ KeyPress KeyPress::createFromDescription (const String& desc) if (key == 0) { - // see if it's a function key.. + // see if it's a function key if (! desc.containsChar ('#')) // avoid mistaking hex-codes like "#f1" { for (int i = 1; i <= 35; ++i) @@ -220,7 +220,7 @@ KeyPress KeyPress::createFromDescription (const String& desc) if (key == 0) { - // give up and use the hex code.. + // give up and use the hex code auto hexCode = desc.fromFirstOccurrenceOf ("#", false, false) .retainCharacters ("0123456789abcdefABCDEF") .getHexValue32(); diff --git a/modules/juce_gui_basics/keyboard/juce_SystemClipboard.h b/modules/juce_gui_basics/keyboard/juce_SystemClipboard.h index 1ecde5a43b..0c788a3adb 100644 --- a/modules/juce_gui_basics/keyboard/juce_SystemClipboard.h +++ b/modules/juce_gui_basics/keyboard/juce_SystemClipboard.h @@ -50,7 +50,7 @@ public: /** Gets the current clipboard's contents. Obviously this might have come from another app, so could contain - anything.. + anything. */ static String getTextFromClipboard(); }; diff --git a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp index fa73297004..2abeb896d5 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentAnimator.cpp @@ -170,7 +170,7 @@ public: else if (c.isOnDesktop() && c.getPeer() != nullptr) addToDesktop (c.getPeer()->getStyleFlags() | ComponentPeer::windowIgnoresKeyPresses); else - jassertfalse; // seem to be trying to animate a component that's not visible.. + jassertfalse; // seem to be trying to animate a component that's not visible auto scale = (float) Desktop::getInstance().getDisplays().getDisplayForRect (getScreenBounds())->scale * Component::getApproximateScaleFactorForComponent (&c); diff --git a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp index e2318fc3f9..b5922f77c7 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentBoundsConstrainer.cpp @@ -248,7 +248,7 @@ void ComponentBoundsConstrainer::checkBounds (Rectangle& bounds, } } - // constrain the aspect ratio if one has been specified.. + // constrain the aspect ratio if one has been specified if (aspectRatio > 0.0) { bool adjustWidth; diff --git a/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp b/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp index 0670005d1f..19f8c14e1f 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentBuilder.cpp @@ -88,7 +88,7 @@ namespace ComponentBuilderHelpers if (type == nullptr || uid.isEmpty()) { - // ..handle the case where a child of the actual state node has changed. + // handle the case where a child of the actual state node has changed if (state.getParent().isValid()) updateComponent (builder, state.getParent()); } @@ -282,7 +282,7 @@ void ComponentBuilder::updateChildComponents (Component& parent, const ValueTree // (remaining unused items in existingComponents get deleted here as it goes out of scope) } - // Make sure the z-order is correct.. + // make sure the z-order is correct if (componentsInOrder.size() > 0) { componentsInOrder.getLast()->toFront (false); diff --git a/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp b/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp index dfe2998c9e..8c40e4f70d 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp +++ b/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.cpp @@ -39,7 +39,7 @@ ComponentMovementWatcher::ComponentMovementWatcher (Component* const comp) : component (comp), wasShowing (comp->isShowing()) { - jassert (component != nullptr); // can't use this with a null pointer.. + jassert (component != nullptr); // can't use this with a null pointer component->addComponentListener (this); registerWithParentComps(); diff --git a/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp b/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp index 5824754c17..a29a45206d 100644 --- a/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp +++ b/modules/juce_gui_basics/layout/juce_StretchableLayoutManager.cpp @@ -167,7 +167,7 @@ void StretchableLayoutManager::layOutComponents (Component** const components, { if (i == numComponents - 1) { - // if it's the last item, crop it to exactly fit the available space.. + // if it's the last item, crop it to exactly fit the available space if (resizeOtherDimension) { if (vertically) @@ -240,7 +240,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex, if (totalIdealSize <= 0) totalIdealSize = 1.0; - // now calc the best sizes.. + // now calc the best sizes int extraSpace = availableSpace - totalMinimums; while (extraSpace > 0) @@ -248,7 +248,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex, int numWantingMoreSpace = 0; int numHavingTakenExtraSpace = 0; - // first figure out how many comps want a slice of the extra space.. + // first figure out how many comps want a slice of the extra space for (int i = startIndex; i < endIndex; ++i) { auto* layout = items.getUnchecked (i); @@ -264,7 +264,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex, ++numWantingMoreSpace; } - // ..share out the extra space.. + // share out the extra space for (int i = startIndex; i < endIndex; ++i) { auto* layout = items.getUnchecked (i); @@ -297,7 +297,7 @@ int StretchableLayoutManager::fitComponentsIntoSpace (const int startIndex, break; } - // ..and calculate the end position + // calculate the end position for (int i = startIndex; i < endIndex; ++i) { auto* layout = items.getUnchecked (i); diff --git a/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp b/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp index 15cba55f92..5d8a37256e 100644 --- a/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp +++ b/modules/juce_gui_basics/layout/juce_StretchableObjectResizer.cpp @@ -42,7 +42,7 @@ void StretchableObjectResizer::addItem (const double size, const double minSize, const double maxSize, const int order) { - // the order must be >= 0 but less than the maximum integer value. + // the order must be >= 0 but less than the maximum integer value jassert (order >= 0 && order < std::numeric_limits::max()); jassert (maxSize >= minSize); diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp index 73e75511b7..c7a747c2eb 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp +++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.cpp @@ -254,7 +254,7 @@ void TabbedButtonBar::addTab (const String& tabName, Colour tabBackgroundColour, int insertIndex) { - jassert (tabName.isNotEmpty()); // you have to give them all a name.. + jassert (tabName.isNotEmpty()); // you have to give them all a name if (tabName.isNotEmpty()) { diff --git a/modules/juce_gui_basics/layout/juce_Viewport.cpp b/modules/juce_gui_basics/layout/juce_Viewport.cpp index 21463288c6..646b122b53 100644 --- a/modules/juce_gui_basics/layout/juce_Viewport.cpp +++ b/modules/juce_gui_basics/layout/juce_Viewport.cpp @@ -186,7 +186,7 @@ void Viewport::deleteOrRemoveContentComp() if (deleteContent) { // This sets the content comp to a null pointer before deleting the old one, in case - // anything tries to use the old one while it's in mid-deletion.. + // anything tries to use the old one while it's in mid-deletion. std::unique_ptr oldCompDeleter (contentComp.get()); contentComp = nullptr; } @@ -409,7 +409,7 @@ void Viewport::updateVisibleArea() auto oldContentBounds = contentComp->getBounds(); contentHolder.setBounds (contentArea); - // If the content has changed its size, that might affect our scrollbars, so go round again and re-calculate.. + // If the content has changed its size, that might affect our scrollbars, so go round again and re-calculate. if (oldContentBounds == contentComp->getBounds()) break; } diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp index 68ff16f061..74dae7d0f6 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp @@ -192,7 +192,7 @@ void LookAndFeel::setUsingNativeAlertWindows (bool shouldUseNativeAlerts) bool LookAndFeel::isUsingNativeAlertWindows() { #if JUCE_LINUX || JUCE_BSD - return false; // not available currently.. + return false; // not available currently #else return useNativeAlertWindows; #endif diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp index bcdbfbd307..b964764215 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp @@ -38,7 +38,7 @@ namespace juce //============================================================================== LookAndFeel_V2::LookAndFeel_V2() { - // initialise the standard set of colours.. + // initialise the standard set of colours const uint32 textButtonColour = 0xffbbbbff; const uint32 textHighlightColour = 0x401111ee; const uint32 standardOutlineColour = 0xb2808080; @@ -557,7 +557,7 @@ void LookAndFeel_V2::drawProgressBar (Graphics& g, ProgressBar& progressBar, } else { - // spinning bar.. + // spinning bar g.setColour (foreground); const int stripeWidth = height * 2; @@ -1762,7 +1762,7 @@ void LookAndFeel_V2::drawTooltip (Graphics& g, const String& text, int width, in { g.fillAll (findColour (TooltipWindow::backgroundColourId)); - #if ! JUCE_MAC // The mac windows already have a non-optional 1 pix outline, so don't double it here.. + #if ! JUCE_MAC // The mac windows already have a non-optional 1 pix outline, so don't double it here. g.setColour (findColour (TooltipWindow::outlineColourId)); g.drawRect (0, 0, width, height, 1); #endif diff --git a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp index 9c07787d40..6e041c6d35 100644 --- a/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp +++ b/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V4.cpp @@ -536,7 +536,7 @@ void LookAndFeel_V4::drawLinearProgressBar (Graphics& g, const ProgressBar& prog } else { - // spinning bar.. + // spinning bar g.setColour (background); auto stripeWidth = height * 2; diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp index ad68b16249..6d28c1b225 100644 --- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp +++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp @@ -1585,7 +1585,7 @@ private: // try to intelligently guess whether the user is moving the mouse towards a currently-open // submenu. To do this, look at whether the mouse stays inside a triangular region that - // extends from the last mouse pos to the submenu's rectangle.. + // extends from the last mouse pos to the submenu's rectangle auto itemScreenBounds = window.activeSubMenu->getScreenBounds(); auto subX = (float) itemScreenBounds.getX(); @@ -2225,7 +2225,7 @@ int PopupMenu::showWithOptionalCallback (const Options& options, ModalComponentManager::getInstance()->attachCallback (window, callback.release()); window->toFront (false); // need to do this after making it modal, or it could - // be stuck behind other comps that are already modal.. + // be stuck behind other comps that are already modal #if JUCE_MODAL_LOOPS_PERMITTED if (userCallback == nullptr && canBeModal) @@ -2400,7 +2400,7 @@ void PopupMenu::CustomComponent::triggerMenuItem() } else { - // something must have gone wrong with the component hierarchy if this happens.. + // something must have gone wrong with the component hierarchy if this happens jassertfalse; } } diff --git a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp index 3485dcf736..5240db0dd4 100644 --- a/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp +++ b/modules/juce_gui_basics/misc/juce_BubbleComponent.cpp @@ -105,7 +105,7 @@ void BubbleComponent::setPosition (Rectangle rectangleToPointTo, int spaceLeft = ((allowablePlacements & left) != 0) ? jmax (0, rectangleToPointTo.getX() - availableSpace.getX()) : -1; int spaceRight = ((allowablePlacements & right) != 0) ? jmax (0, availableSpace.getRight() - rectangleToPointTo.getRight()) : -1; - // look at whether the component is elongated, and if so, try to position next to its longer dimension. + // look at whether the component is elongated, and if so, try to position next to its longer dimension if (rectangleToPointTo.getWidth() > rectangleToPointTo.getHeight() * 2 && (spaceAbove > totalH + 20 || spaceBelow > totalH + 20)) { diff --git a/modules/juce_gui_basics/misc/juce_DropShadower.cpp b/modules/juce_gui_basics/misc/juce_DropShadower.cpp index c4c2f56635..d2b88ae4df 100644 --- a/modules/juce_gui_basics/misc/juce_DropShadower.cpp +++ b/modules/juce_gui_basics/misc/juce_DropShadower.cpp @@ -374,7 +374,7 @@ void DropShadower::updateShadows() for (int i = 4; --i >= 0;) { // there seem to be rare situations where the dropshadower may be deleted by - // callbacks during this loop, so use a weak ref to watch out for this.. + // callbacks during this loop, so use a weak ref to watch out for this WeakReference sw (shadowWindows[i]); if (sw != nullptr) diff --git a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp index a6136158ef..828bfdd6a4 100644 --- a/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp +++ b/modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp @@ -126,7 +126,7 @@ public: finalTarget->itemDropped (details); } - // careful - this object could now be deleted.. + // careful - this object could now be deleted } } @@ -543,7 +543,7 @@ void DragAndDropContainer::startDragging (const var& sourceDescription, #if JUCE_WINDOWS // Under heavy load, the layered window's paint callback can often be lost by the OS, - // so forcing a repaint at least once makes sure that the window becomes visible.. + // so forcing a repaint at least once makes sure that the window becomes visible. if (auto* peer = dragImageComponent->getPeer()) peer->performAnyPendingRepaintsNow(); #endif diff --git a/modules/juce_gui_basics/mouse/juce_LassoComponent.h b/modules/juce_gui_basics/mouse/juce_LassoComponent.h index b1ffe05330..04541fea08 100644 --- a/modules/juce_gui_basics/mouse/juce_LassoComponent.h +++ b/modules/juce_gui_basics/mouse/juce_LassoComponent.h @@ -213,7 +213,7 @@ public: getLookAndFeel().drawLasso (g, *this); // this suggests that you've left a lasso comp lying around after the - // mouse drag has finished.. Be careful to call endLasso() when you get a + // mouse drag has finished. Be careful to call endLasso() when you get a // mouse-up event. jassert (isMouseButtonDownAnywhere()); } diff --git a/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp b/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp index f7796bcae3..920b499a5a 100644 --- a/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp +++ b/modules/juce_gui_basics/native/juce_ContentSharer_android.cpp @@ -188,7 +188,7 @@ public: { --numOpenedHandles; - // numOpenedHandles may get negative if we don't receive open handle event. + // numOpenedHandles may get negative if we don't receive open handle event if (fileWasRead && numOpenedHandles <= 0) { MessageManager::callAsync ([fo = fileObserver, oc = onClose] diff --git a/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp b/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp index 48d977e179..db9f03a03b 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp +++ b/modules/juce_gui_basics/native/juce_FileChooser_linux.cpp @@ -270,7 +270,7 @@ private: if (! filename.isEmpty()) args.add ("--filename=" + filename); - // supplying the window ID of the topmost window makes sure that Zenity pops up.. + // supplying the window ID of the topmost window makes sure that Zenity pops up if (uint64 topWindowID = getTopWindowID()) setenv ("WINDOWID", String (topWindowID).toRawUTF8(), true); } diff --git a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm index 3ae4e8f1fe..d2e37805a2 100644 --- a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm +++ b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm @@ -628,7 +628,7 @@ public: [menu release]; } - // use a dummy modal component so that apps can tell that something is currently modal. + // use a dummy modal component so that apps can tell that something is currently modal dummyModalComponent.enterModalState (false); } diff --git a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm index 77e039316e..3c9bae0cf5 100644 --- a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm +++ b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm @@ -934,13 +934,13 @@ public: if (([ev modifierFlags] & NSEventModifierFlagCommand) != 0) { - // for command keys, the key-up event is thrown away, so simulate one.. + // for command keys, the key-up event is thrown away, so simulate one updateKeysDown (ev, false); used = (isValidPeer (this) && handleKeyEvent (ev, false)) || used; } - // (If we're running modally, don't allow unused keystrokes to be passed - // along to other blocked views..) + // If we're running modally, don't allow unused keystrokes to be passed + // along to other blocked views. if (Component::getCurrentlyModalComponent() != nullptr) used = true; @@ -1205,7 +1205,7 @@ public: { // In plugins, the host could put our plugin window inside a modal window, so this // allows us to successfully open other popups. Feels like there could be edge-case - // problems caused by this, so let us know if you spot any issues.. + // problems caused by this, so let us know if you spot any issues. return ! JUCEApplication::isStandaloneApp(); } @@ -2688,7 +2688,7 @@ private: { // In some host situations, the host will stop modal loops from working // correctly if they're called from a mouse event, so we'll trigger - // the event asynchronously.. + // the event asynchronously. [self performSelectorOnMainThread: NSViewComponentPeer::asyncMouseDownSelector withObject: ev waitUntilDone: NO]; @@ -2705,7 +2705,7 @@ private: { // In some host situations, the host will stop modal loops from working // correctly if they're called from a mouse event, so we'll trigger - // the event asynchronously.. + // the event asynchronously. [self performSelectorOnMainThread: NSViewComponentPeer::asyncMouseUpSelector withObject: ev waitUntilDone: NO]; diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index ea33441e56..b8ec8c6b08 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -2033,7 +2033,7 @@ void UIViewComponentPeer::toBehind (ComponentPeer* other) void UIViewComponentPeer::setIcon (const Image& /*newIcon*/) { - // to do.. + // todo } //============================================================================== @@ -2094,7 +2094,7 @@ void UIViewComponentPeer::handleTouches (UIEvent* event, MouseEventFlags mouseEv ModifierKeys::currentModifiers = ModifierKeys::getCurrentModifiers().withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier); modsToSend = ModifierKeys::getCurrentModifiers(); - // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before. + // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(), MouseInputSource::defaultPressure, MouseInputSource::defaultOrientation, time, {}, touchIndex); diff --git a/modules/juce_gui_basics/native/juce_Windowing_android.cpp b/modules/juce_gui_basics/native/juce_Windowing_android.cpp index 416ea007af..979778016b 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_android.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_android.cpp @@ -1717,7 +1717,7 @@ public: lastMousePos = Desktop::getInstance().getDisplays().physicalToLogical (sysPos); auto pos = globalToLocal (lastMousePos); - // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before. + // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, ModifierKeys::currentModifiers.withoutMouseButtons(), diff --git a/modules/juce_gui_basics/native/juce_Windowing_linux.cpp b/modules/juce_gui_basics/native/juce_Windowing_linux.cpp index 728bf82ff9..d42a5b321c 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_linux.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_linux.cpp @@ -44,7 +44,7 @@ public: : ComponentPeer (comp, windowStyleFlags), isAlwaysOnTop (comp.isAlwaysOnTop()) { - // it's dangerous to create a window on a thread other than the message thread. + // it's dangerous to create a window on a thread other than the message thread JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED const auto* instance = XWindowSystem::getInstance(); @@ -72,7 +72,7 @@ public: ~LinuxComponentPeer() override { - // it's dangerous to delete a window on a thread other than the message thread. + // it's dangerous to delete a window on a thread other than the message thread JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED auto* instance = XWindowSystem::getInstance(); diff --git a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp index 870712d587..c58a20ede9 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_windows.cpp +++ b/modules/juce_gui_basics/native/juce_Windowing_windows.cpp @@ -41,9 +41,9 @@ namespace juce JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wcast-function-type") -#undef GetSystemMetrics // multimon overrides this for some reason and causes a mess.. +#undef GetSystemMetrics // multimon overrides this for some reason and causes a mess -// these are in the windows SDK, but need to be repeated here for GCC.. +// these are in the windows SDK, but need to be repeated here for GCC #ifndef GET_APPCOMMAND_LPARAM #define GET_APPCOMMAND_LPARAM(lParam) ((short) (HIWORD (lParam) & ~FAPPCOMMAND_MASK)) @@ -1822,7 +1822,7 @@ public: if (! makeActive) { - // in this case a broughttofront call won't have occurred, so do it now.. + // in this case a broughttofront call won't have occurred, so do it now handleBroughtToFront(); } } @@ -2711,7 +2711,7 @@ private: // This avoids a rare stuck-button problem when focus is lost unexpectedly, but must // not be called as part of a move, in case it's actually a mouse-drag from another - // app which ends up here when we get focus before the mouse is released.. + // app which ends up here when we get focus before the mouse is released. if (isMouseDownEvent) NullCheckedInvocation::invoke (getNativeRealtimeModifiers); @@ -3038,7 +3038,7 @@ private: ModifierKeys::currentModifiers = ModifierKeys::getCurrentModifiers().withoutMouseButtons().withFlags (ModifierKeys::leftButtonModifier); modsToSend = ModifierKeys::getCurrentModifiers(); - // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before. + // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before handleMouseEvent (MouseInputSource::InputSourceType::touch, pos, modsToSend.withoutMouseButtons(), pressure, orientation, time, {}, touchIndex); @@ -3159,7 +3159,7 @@ private: { modsToSend = ModifierKeys::currentModifiers; - // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before. + // this forces a mouse-enter/up event, in case for some reason we didn't get a mouse-up before handleMouseEvent (MouseInputSource::InputSourceType::pen, pos, modsToSend.withoutMouseButtons(), pressure, MouseInputSource::defaultOrientation, time, penDetails); @@ -3349,7 +3349,7 @@ private: } else { - // convert the scan code to an unmodified character code.. + // convert the scan code to an unmodified character code const UINT virtualKey = MapVirtualKey ((UINT) virtualScanCode, 1); UINT keyChar = MapVirtualKey (virtualKey, 2); @@ -3577,7 +3577,7 @@ private: handleMovedOrResized(); updateCurrentMonitorAndRefreshVBlankDispatcher(); - return ! dontRepaint; // to allow non-accelerated openGL windows to draw themselves correctly. + return ! dontRepaint; // to allow non-accelerated openGL windows to draw themselves correctly } //============================================================================== @@ -3980,7 +3980,7 @@ private: return 0; case WM_NCPAINT: - // this must be done, even with native titlebars, or there are rendering artifacts. + // This must be done, even with native titlebars, or there are rendering artifacts. handlePaintMessage(); // Even if we're *not* using a native titlebar (i.e. extending into the nonclient area) // the system needs to handle the NCPAINT to draw rounded corners and shadows. @@ -4218,7 +4218,7 @@ private: // while a temporary window is being shown, prevent Windows from deactivating the // title bars of our main windows. if (wParam == 0 && ! shouldDeactivateTitleBar) - wParam = TRUE; // change this and let it get passed to the DefWindowProc. + wParam = TRUE; // change this and let it get passed to the DefWindowProc break; @@ -4494,7 +4494,7 @@ private: { if (compositionInProgress) { - // If this occurs, the user has cancelled the composition, so clear their changes.. + // If this occurs, the user has cancelled the composition, so clear their changes. if (auto* target = owner.findCurrentTextInputTarget()) { target->setHighlightedRegion (compositionRange); diff --git a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp index 4e4d0f715b..56f6dac089 100644 --- a/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp +++ b/modules/juce_gui_basics/native/juce_XWindowSystem_linux.cpp @@ -362,7 +362,7 @@ namespace X11ErrorHandling // Usually happens when client-server connection is broken static int ioErrorHandler (::Display*) { - DBG ("ERROR: connection to X server broken.. terminating."); + DBG ("ERROR: connection to X server broken, terminating."); if (JUCEApplicationBase::isStandaloneApp()) MessageManager::getInstance()->stopDispatchLoop(); @@ -1077,7 +1077,7 @@ public: } } - // blit results to screen. + // blit results to screen #if JUCE_USE_XSHM if (isUsingXShm()) X11Symbols::getInstance()->xShmPutImage (display, (::Drawable) window, gc, xImage.get(), sx, sy, dx, dy, dw, dh, True); @@ -1350,12 +1350,12 @@ namespace ClipboardHelpers return true; } - return false; // the format we asked for was denied.. (event.xselection.property == None) + return false; // the format we asked for was denied (event.xselection.property == None) } - // not very elegant.. we could do a select() or something like that... - // however clipboard content requesting is inherently slow on x11, it - // often takes 50ms or more so... + // not very elegant, we could do a select() or something like that; + // however, clipboard content requesting is inherently slow on x11, it + // often takes 50ms or more so Thread::sleep (4); } @@ -2520,7 +2520,7 @@ ModifierKeys XWindowSystem::getNativeRealtimeModifiers() const XWindowSystemUtilities::ScopedXLock xLock; - // xQueryPointer doesn't emit masks for back/forward buttons. + // xQueryPointer doesn't emit masks for back/forward buttons if (X11Symbols::getInstance()->xQueryPointer (display, X11Symbols::getInstance()->xRootWindow (display, X11Symbols::getInstance()->xDefaultScreen (display)), @@ -3228,7 +3228,7 @@ bool XWindowSystem::initialiseXDisplay() displayName = ":0.0"; // it seems that on some systems XOpenDisplay will occasionally - // fail the first time, but succeed on a second attempt.. + // fail the first time, but succeed on a second attempt for (int retries = 2; --retries >= 0;) { display = X11Symbols::getInstance()->xOpenDisplay (displayName.toUTF8()); diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinate.h b/modules/juce_gui_basics/positioning/juce_RelativeCoordinate.h index 7a1fe266c1..6947376455 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinate.h +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinate.h @@ -48,7 +48,7 @@ namespace juce right of the one called "xyz", you could set your left edge to be "xyz.right + 50". - Instead of an [id], you can use the name "parent" to refer to this component's parent. Like any other component, these values are relative to their component's parent, so "parent.right" won't be - very useful for positioning a component because it refers to a position with the parent's parent.. but + very useful for positioning a component because it refers to a position with the parent's parent, but "parent.width" can be used for setting positions relative to the parent's size. E.g. to make a 10x10 component which remains 1 pixel away from its parent's bottom-right, you could use "right - 10, bottom - 10, parent.width - 1, parent.height - 1". @@ -62,7 +62,7 @@ namespace juce you could express it as: @code myComp.setBounds (RelativeBounds ("parent.width / 2 - 50, parent.height / 2 - 50, left + 100, top + 100")); @endcode - ..or an alternative way to achieve the same thing: + or an alternative way to achieve the same thing: @code myComp.setBounds (RelativeBounds ("right - 100, bottom - 100, parent.width / 2 + 50, parent.height / 2 + 50")); @endcode diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp index 7ee6aee329..00fc81652d 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.cpp @@ -201,7 +201,7 @@ public: } else { - // The marker we want doesn't exist, so watch all lists in case they change and the marker appears later.. + // The marker we want doesn't exist, so watch all lists in case they change and the marker appears later. if (auto* mlh = dynamic_cast (parent)) { positioner.registerMarkerListListener (mlh->getMarkers (true)); @@ -227,7 +227,7 @@ public: } else { - // The named component doesn't exist, so we'll watch the parent for changes in case it appears later.. + // The named component doesn't exist, so we'll watch the parent for changes in case it appears later. if (Component* const parent = component.getParentComponent()) positioner.registerComponentListener (*parent); diff --git a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp index 2d997f252d..cd2f9e8305 100644 --- a/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp +++ b/modules/juce_gui_basics/properties/juce_PropertyPanel.cpp @@ -296,7 +296,7 @@ void PropertyPanel::updatePropHolderLayout() const auto newMaxWidth = viewport.getMaximumVisibleWidth(); if (maxWidth != newMaxWidth) { - // need to do this twice because of scrollbars changing the size, etc. + // need to do this twice because of scrollbars changing the size, etc propertyHolderComponent->updateLayout (newMaxWidth); } } diff --git a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp index cca35f1645..a7b67d6d40 100644 --- a/modules/juce_gui_basics/widgets/juce_ComboBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ComboBox.cpp @@ -92,7 +92,7 @@ void ComboBox::setTooltip (const String& newTooltip) //============================================================================== void ComboBox::addItem (const String& newItemText, int newItemId) { - // you can't add empty strings to the list.. + // you can't add empty strings to the list jassert (newItemText.isNotEmpty()); // IDs must be non-zero, as zero is used to indicate a lack of selection. @@ -118,7 +118,7 @@ void ComboBox::addSeparator() void ComboBox::addSectionHeading (const String& headingName) { - // you can't add empty strings to the list.. + // you can't add empty strings to the list jassert (headingName.isNotEmpty()); if (headingName.isNotEmpty()) diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.cpp b/modules/juce_gui_basics/widgets/juce_ListBox.cpp index 4038bc2837..f0ff7e69fb 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ListBox.cpp @@ -490,7 +490,7 @@ public: if ((key.getModifiers().getRawFlags() & ~allowableMods) == 0) { // we want to avoid these keypresses going to the viewport, and instead allow - // them to pass up to our listbox.. + // them to pass up to our listbox return false; } } diff --git a/modules/juce_gui_basics/widgets/juce_Slider.cpp b/modules/juce_gui_basics/widgets/juce_Slider.cpp index d28f7f459a..d3a9b81dd6 100644 --- a/modules/juce_gui_basics/widgets/juce_Slider.cpp +++ b/modules/juce_gui_basics/widgets/juce_Slider.cpp @@ -162,7 +162,7 @@ public: } } - // keep the current values inside the new range.. + // keep the current values inside the new range if (style != TwoValueHorizontal && style != TwoValueVertical) { setValue (getValue(), dontSendNotification); @@ -452,7 +452,7 @@ public: setValue (newValue, sendNotificationSync); } - updateText(); // force a clean-up of the text, needed in case setValue() hasn't done this. + updateText(); // force a clean-up of the text, needed in case setValue() hasn't done this } void updateText() @@ -553,7 +553,7 @@ public: void showTextBox() { - jassert (editableText); // this should probably be avoided in read-only sliders. + jassert (editableText); // this should probably be avoided in read-only sliders if (valueBox != nullptr) valueBox->showEditor(); @@ -1143,7 +1143,7 @@ public: && style != TwoValueVertical) { // sometimes duplicate wheel events seem to be sent, so since we're going to - // bump the value by a minimum of the interval, avoid doing this twice.. + // bump the value by a minimum of the interval, avoid doing this twice if (e.eventTime != lastMouseWheelTime) { lastMouseWheelTime = e.eventTime; @@ -1481,7 +1481,7 @@ void Slider::setSliderStyle (SliderStyle newStyle) { pimpl->setSlid void Slider::setRotaryParameters (RotaryParameters p) noexcept { - // make sure the values are sensible.. + // make sure the values are sensible jassert (p.startAngleRadians >= 0 && p.endAngleRadians >= 0); jassert (p.startAngleRadians < MathConstants::pi * 4.0f && p.endAngleRadians < MathConstants::pi * 4.0f); diff --git a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp index bb9dd9cb34..86b5484e55 100644 --- a/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp +++ b/modules/juce_gui_basics/widgets/juce_TableHeaderComponent.cpp @@ -650,7 +650,7 @@ void TableHeaderComponent::mouseDrag (const MouseEvent& e) if (newIndex > 0) { // if the previous column isn't draggable, we can't move our column - // past it, because that'd change the undraggable column's position.. + // past it, because that'd change the undraggable column's position auto* previous = columns.getUnchecked (newIndex - 1); if ((previous->propertyFlags & draggable) != 0) @@ -669,7 +669,7 @@ void TableHeaderComponent::mouseDrag (const MouseEvent& e) if (newIndex < columns.size() - 1) { // if the next column isn't draggable, we can't move our column - // past it, because that'd change the undraggable column's position.. + // past it, because that'd change the undraggable column's position auto* nextCol = columns.getUnchecked (newIndex + 1); if ((nextCol->propertyFlags & draggable) != 0) diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.cpp b/modules/juce_gui_basics/widgets/juce_TreeView.cpp index 251aeaa6fa..b5b647821c 100644 --- a/modules/juce_gui_basics/widgets/juce_TreeView.cpp +++ b/modules/juce_gui_basics/widgets/juce_TreeView.cpp @@ -454,7 +454,7 @@ private: } else { - // mouse-down inside the body of the item.. + // mouse-down inside the body of the item if (! owner.isMultiSelectEnabled()) item.setSelected (true, true); else if (item.isSelected()) @@ -847,7 +847,7 @@ struct TreeView::InsertPoint if (files.size() > 0 ? item->isInterestedInFileDrag (files) : item->isInterestedInDragSource (dragSourceDetails)) { - // Check if we're trying to drag into an empty group item.. + // Check if we're trying to drag into an empty group item. if (oldY > itemPos.getY() + itemPos.getHeight() / 4 && oldY < itemPos.getBottom() - itemPos.getHeight() / 4) { @@ -882,7 +882,7 @@ struct TreeView::InsertPoint } else if (auto* root = view.getRootItem()) { - // If they're dragging beyond the bottom of the list, then insert at the end of the root item.. + // If they're dragging beyond the bottom of the list, then insert at the end of the root item. item = root; insertIndex = root->getNumSubItems(); pos = root->getItemPosition (true).getBottomLeft(); @@ -983,7 +983,7 @@ void TreeView::setRootItem (TreeViewItem* const newRootItem) { if (newRootItem != nullptr) { - // can't use a tree item in more than one tree at once.. + // can't use a tree item in more than one tree at once jassert (newRootItem->ownerView == nullptr); if (newRootItem->ownerView != nullptr) @@ -1220,7 +1220,7 @@ void TreeView::moveSelectedRow (int delta) if (! item->canBeSelected()) { // if the row we want to highlight doesn't allow it, try skipping - // to the next item.. + // to the next item auto nextRowToTry = jlimit (0, numRowsInTree - 1, rowSelected + (delta < 0 ? -1 : 1)); if (rowSelected != nextRowToTry) diff --git a/modules/juce_gui_basics/widgets/juce_TreeView.h b/modules/juce_gui_basics/widgets/juce_TreeView.h index dac852f436..000a6aa1a0 100644 --- a/modules/juce_gui_basics/widgets/juce_TreeView.h +++ b/modules/juce_gui_basics/widgets/juce_TreeView.h @@ -121,7 +121,7 @@ public: int compareElements (TreeViewItem* first, TreeViewItem* second); @endcode - ..and this method must return: + ...and this method must return: - a value of < 0 if the first comes before the second - a value of 0 if the two objects are equivalent - a value of > 0 if the second comes before the first @@ -588,7 +588,7 @@ public: @code void MyTreeViewItem::updateChildItems() { - OpennessRestorer openness (*this); // saves the openness state here.. + OpennessRestorer openness (*this); // saves the openness state here clearSubItems(); @@ -596,8 +596,8 @@ public: // were previously there addSubItem (... - // ..and at this point, the old openness is restored, so any items that haven't - // changed will have their old openness retained. + // and at this point, the old openness is restored, so any items that haven't + // changed will have their old openness retained } @endcode */ diff --git a/modules/juce_gui_basics/windows/juce_CallOutBox.cpp b/modules/juce_gui_basics/windows/juce_CallOutBox.cpp index 2fc1b00a97..bc7a072dac 100644 --- a/modules/juce_gui_basics/windows/juce_CallOutBox.cpp +++ b/modules/juce_gui_basics/windows/juce_CallOutBox.cpp @@ -144,7 +144,7 @@ void CallOutBox::inputAttemptWhenModal() { // if you click on the area that originally popped-up the callout, you expect it // to get rid of the box, but deleting the box here allows the click to pass through and - // probably re-trigger it, so we need to dismiss the box asynchronously to consume the click.. + // probably re-trigger it, so we need to dismiss the box asynchronously to consume the click // For touchscreens, we make sure not to dismiss the CallOutBox immediately, // as Windows still sends touch events before the CallOutBox had a chance diff --git a/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp b/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp index cf7aee0c36..ae1b98dca2 100644 --- a/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp +++ b/modules/juce_gui_basics/windows/juce_ComponentPeer.cpp @@ -164,7 +164,7 @@ void ComponentPeer::handlePaint (LowLevelGraphicsContext& contextToPaintTo) #endif /** If this fails, it's probably be because your CPU floating-point precision mode has - been set to low.. This setting is sometimes changed by things like Direct3D, and can + been set to low. This setting is sometimes changed by things like Direct3D, and can mess up a lot of the calculations that the library needs to do. */ jassert (roundToInt (10.1f) == 10); @@ -562,7 +562,7 @@ bool ComponentPeer::handleDragDrop (const ComponentPeer::DragInfo& info) infoCopy.position = targetComp->getLocalPoint (&component, info.position); // We'll use an async message to deliver the drop, because if the target decides - // to run a modal loop, it can gum-up the operating system.. + // to run a modal loop, it can gum-up the operating system. MessageManager::callAsync ([=] { if (auto* c = targetComp.get()) diff --git a/modules/juce_gui_basics/windows/juce_DocumentWindow.cpp b/modules/juce_gui_basics/windows/juce_DocumentWindow.cpp index a40df3aa55..8865ecba9d 100644 --- a/modules/juce_gui_basics/windows/juce_DocumentWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_DocumentWindow.cpp @@ -75,7 +75,7 @@ DocumentWindow::~DocumentWindow() { // Don't delete or remove the resizer components yourself! They're managed by the // DocumentWindow, and you should leave them alone! You may have deleted them - // accidentally by careless use of deleteAllChildren()..? + // accidentally by careless use of deleteAllChildren()? jassert (menuBar == nullptr || getIndexOfChildComponent (menuBar.get()) >= 0); jassert (titleBarButtons[0] == nullptr || getIndexOfChildComponent (titleBarButtons[0].get()) >= 0); jassert (titleBarButtons[1] == nullptr || getIndexOfChildComponent (titleBarButtons[1].get()) >= 0); diff --git a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp index 56d9c2d279..9880a43bfd 100644 --- a/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_ResizableWindow.cpp @@ -52,7 +52,7 @@ ResizableWindow::~ResizableWindow() { // Don't delete or remove the resizer components yourself! They're managed by the // ResizableWindow, and you should leave them alone! You may have deleted them - // accidentally by careless use of deleteAllChildren()..? + // accidentally by careless use of deleteAllChildren()? jassert (resizableCorner == nullptr || getIndexOfChildComponent (resizableCorner.get()) >= 0); jassert (resizableBorder == nullptr || getIndexOfChildComponent (resizableBorder.get()) >= 0); @@ -60,7 +60,7 @@ ResizableWindow::~ResizableWindow() resizableBorder.reset(); clearContentComponent(); - // have you been adding your own components directly to this window..? tut tut tut. + // Maybe you've added your own components directly to this window, which isn't supported. // Read the instructions for using a ResizableWindow! jassert (getNumChildComponents() == 0); } @@ -152,7 +152,7 @@ void ResizableWindow::setContentComponent (Component* const newContentComponent, void ResizableWindow::setContentComponentSize (int width, int height) { - jassert (width > 0 && height > 0); // not a great idea to give it a zero size.. + jassert (width > 0 && height > 0); // not a great idea to give it a zero size auto border = getContentComponentBorder(); @@ -299,7 +299,7 @@ void ResizableWindow::setResizeLimits (int newMinimumWidth, int newMaximumWidth, int newMaximumHeight) noexcept { - // if you've set up a custom constrainer then these settings won't have any effect.. + // if you've set up a custom constrainer then these settings won't have any effect jassert (constrainer == &defaultConstrainer || constrainer == nullptr); if (constrainer == nullptr) diff --git a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp index 737b0fd46e..d65fda486a 100644 --- a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.cpp @@ -53,7 +53,7 @@ ThreadWithProgressWindow::ThreadWithProgressWindow (const String& title, {}, {}, MessageBoxIconType::NoIcon, hasCancelButton ? 1 : 0, componentToCentreAround)); - // if there are no buttons, we won't allow the user to interrupt the thread. + // if there are no buttons, we won't allow the user to interrupt the thread alertWindow->setEscapeKeyCancels (false); if (hasProgressBar) diff --git a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h index 3276a17692..8fe5e15b8c 100644 --- a/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h +++ b/modules/juce_gui_basics/windows/juce_ThreadWithProgressWindow.h @@ -75,11 +75,11 @@ namespace juce if (m.runThread()) { - // thread finished normally.. + // thread finished normally } else { - // user pressed the cancel button.. + // user pressed the cancel button } } diff --git a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp index 28f5a603ff..855c250f20 100644 --- a/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_TooltipWindow.cpp @@ -144,7 +144,7 @@ void TooltipWindow::displayTipInternal (Point screenPos, const String& tip, { if (w != nullptr && w != this && w->tipShowing == tipShowing && w->getParentComponent() == parent) { - // Looks like you have more than one TooltipWindow showing the same tip.. + // Looks like you have more than one TooltipWindow showing the same tip. // Be careful not to create more than one instance of this class with the // same parent component! jassertfalse; @@ -242,7 +242,7 @@ void TooltipWindow::timerCallback() if (isVisible() || now < lastHideTime + 500) { // if a tip is currently visible (or has just disappeared), update to a new one - // immediately if needed.. + // immediately if needed if (newComp == nullptr || dismissalMouseEventOccurred || newTip.isEmpty()) hideTip(); else if (tipChanged) diff --git a/modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp b/modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp index ba32364866..18dfe2fcce 100644 --- a/modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp +++ b/modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp @@ -164,7 +164,7 @@ void TopLevelWindow::addToDesktop() { shadower = nullptr; Component::addToDesktop (getDesktopWindowStyleFlags()); - setDropShadowEnabled (isDropShadowEnabled()); // force an update to clear away any fake shadows if necessary. + setDropShadowEnabled (isDropShadowEnabled()); // force an update to clear away any fake shadows if necessary } void TopLevelWindow::addToDesktop (int windowStyleFlags, void* nativeWindowToAttachTo) diff --git a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp index e242691b04..3dd2b11066 100644 --- a/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp +++ b/modules/juce_gui_extra/code_editor/juce_CodeDocument.cpp @@ -494,7 +494,7 @@ void CodeDocument::Position::moveBy (int characterDelta) { setPosition (getPosition()); - // If moving right, make sure we don't get stuck between the \r and \n characters.. + // If moving right, make sure we don't get stuck between the \r and \n characters. if (line < owner->lines.size()) { auto& l = *owner->lines.getUnchecked (line); @@ -711,7 +711,7 @@ bool CodeDocument::writeToStream (OutputStream& stream) { for (auto* l : lines) { - auto temp = l->line; // use a copy to avoid bloating the memory footprint of the stored string. + auto temp = l->line; // use a copy to avoid bloating the memory footprint of the stored string const char* utf8 = temp.toUTF8(); if (! stream.write (utf8, strlen (utf8))) @@ -869,7 +869,7 @@ void CodeDocument::checkLastLineStatus() && lines.getLast()->lineLength == 0 && (lines.size() == 1 || ! lines.getUnchecked (lines.size() - 2)->endsWithLineBreak())) { - // remove any empty lines at the end if the preceding line doesn't end in a newline. + // remove any empty lines at the end if the preceding line doesn't end in a newline lines.removeLast(); } @@ -877,7 +877,7 @@ void CodeDocument::checkLastLineStatus() if (lastLine != nullptr && lastLine->endsWithLineBreak()) { - // check that there's an empty line at the end if the preceding one ends in a newline.. + // check that there's an empty line at the end if the preceding one ends in a newline lines.add (new CodeDocumentLine (StringRef(), StringRef(), 0, 0, lastLine->lineStartInFile + lastLine->lineLength)); } diff --git a/modules/juce_gui_extra/documents/juce_FileBasedDocument.h b/modules/juce_gui_extra/documents/juce_FileBasedDocument.h index 7829c90721..ddb683a950 100644 --- a/modules/juce_gui_extra/documents/juce_FileBasedDocument.h +++ b/modules/juce_gui_extra/documents/juce_FileBasedDocument.h @@ -64,8 +64,8 @@ public: @param fileExtension the extension to use when loading/saving files, e.g. ".doc" @param fileWildCard the wildcard to use in file dialogs, e.g. "*.doc" - @param openFileDialogTitle the title to show on an open-file dialog, e.g. "Choose a file to open.." - @param saveFileDialogTitle the title to show on an save-file dialog, e.g. "Choose a file to save as.." + @param openFileDialogTitle the title to show on an open-file dialog, e.g. "Choose a file to open" + @param saveFileDialogTitle the title to show on an save-file dialog, e.g. "Choose a file to save as" */ FileBasedDocument (const String& fileExtension, const String& fileWildCard, diff --git a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp index 17257008f8..c20a556f52 100644 --- a/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp +++ b/modules/juce_gui_extra/misc/juce_KeyMappingEditorComponent.cpp @@ -86,7 +86,7 @@ public: } else { - assignNewKey(); // + button pressed.. + assignNewKey(); // + button pressed } } @@ -118,7 +118,7 @@ public: addButton (TRANS ("OK"), 1); addButton (TRANS ("Cancel"), 0); - // (avoid return + escape keys getting processed by the buttons..) + // avoid return + escape keys getting processed by the buttons for (auto* child : getChildren()) child->setWantsKeyboardFocus (false); diff --git a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp index 1ef3ae6556..b21795d468 100644 --- a/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp +++ b/modules/juce_gui_extra/misc/juce_LiveConstantEditor.cpp @@ -210,7 +210,7 @@ void LivePropertyEditorBase::findOriginalValueInCode() if (p.isEmpty()) { - // Not sure how this would happen - some kind of mix-up between source code and line numbers.. + // Not sure how this would happen - some kind of mix-up between source code and line numbers. jassertfalse; return; } diff --git a/modules/juce_gui_extra/misc/juce_SplashScreen.h b/modules/juce_gui_extra/misc/juce_SplashScreen.h index b050517d76..5ed72a60ea 100644 --- a/modules/juce_gui_extra/misc/juce_SplashScreen.h +++ b/modules/juce_gui_extra/misc/juce_SplashScreen.h @@ -65,9 +65,9 @@ namespace juce void MyApp::myInitialisationWorkFinished() { - // ..assuming this is some kind of callback method that is triggered when + // ...assuming this is some kind of callback method that is triggered when // your background initialisation threads have finished, and it's time to open - // your main window, etc.. + // your main window, etc. splash->deleteAfterDelay (RelativeTime::seconds (4), false); diff --git a/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp b/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp index e687e7ef58..6c6f00423f 100644 --- a/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp +++ b/modules/juce_gui_extra/native/juce_ActiveXComponent_windows.cpp @@ -121,8 +121,8 @@ namespace ActiveXHelpers JUCE_COMRESULT GetWindowContext (LPOLEINPLACEFRAME* lplpFrame, LPOLEINPLACEUIWINDOW* lplpDoc, LPRECT, LPRECT, LPOLEINPLACEFRAMEINFO lpFrameInfo) override { - /* Note: If you call AddRef on the frame here, then some types of object (e.g. web browser control) cause leaks.. - If you don't call AddRef then others crash (e.g. QuickTime).. Bit of a catch-22, so letting it leak is probably preferable. + /* Note: If you call AddRef on the frame here, then some types of object (e.g. web browser control) cause leaks. + If you don't call AddRef then others crash (e.g. QuickTime). Bit of a catch-22, so letting it leak is probably preferable. */ if (lplpFrame != nullptr) { frame->AddRef(); *lplpFrame = frame; } if (lplpDoc != nullptr) *lplpDoc = nullptr; diff --git a/modules/juce_gui_extra/native/juce_NSViewComponent_mac.mm b/modules/juce_gui_extra/native/juce_NSViewComponent_mac.mm index f14aaa2b54..5b9127b6b6 100644 --- a/modules/juce_gui_extra/native/juce_NSViewComponent_mac.mm +++ b/modules/juce_gui_extra/native/juce_NSViewComponent_mac.mm @@ -124,7 +124,7 @@ private: { if ([view superview] != nil) [view removeFromSuperview]; // Must be careful not to call this unless it's required - e.g. some Apple AU views - // override the call and use it as a sign that they're being deleted, which breaks everything.. + // override the call and use it as a sign that they're being deleted, which breaks everything. } JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (NSViewAttachment) diff --git a/modules/juce_gui_extra/native/juce_UIViewComponent_ios.mm b/modules/juce_gui_extra/native/juce_UIViewComponent_ios.mm index 912f15c968..bef367cb6d 100644 --- a/modules/juce_gui_extra/native/juce_UIViewComponent_ios.mm +++ b/modules/juce_gui_extra/native/juce_UIViewComponent_ios.mm @@ -76,7 +76,7 @@ public: { if ([view superview] != nil) [view removeFromSuperview]; // Must be careful not to call this unless it's required - e.g. some Apple AU views - // override the call and use it as a sign that they're being deleted, which breaks everything.. + // override the call and use it as a sign that they're being deleted, which breaks everything. currentPeer = peer; if (peer != nullptr) diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm index 782428ab8c..d881e76ef2 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm @@ -797,7 +797,7 @@ public: { JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wundeclared-selector") // WebKit doesn't capture mouse-moves itself, so it seems the only way to make - // them work is to push them via this non-public method.. + // them work is to push them via this non-public method. if ([webView.get() respondsToSelector: @selector (_updateMouseoverWithFakeEvent)]) [webView.get() performSelector: @selector (_updateMouseoverWithFakeEvent)]; JUCE_END_IGNORE_WARNINGS_GCC_LIKE diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp b/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp index b08e1c4c94..d05a5f8136 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_windows.cpp @@ -74,7 +74,7 @@ public: { // when the component becomes invisible, some stuff like flash // carries on playing audio, so we need to force it onto a blank - // page to avoid this.. + // page to avoid this. owner.blankPageShown = true; goToURL ("about:blank", nullptr, nullptr); @@ -478,7 +478,7 @@ public: { // when the component becomes invisible, some stuff like flash // carries on playing audio, so we need to force it onto a blank - // page to avoid this.. + // page to avoid this. owner.blankPageShown = true; goToURL ("about:blank", nullptr, nullptr); diff --git a/modules/juce_opengl/native/juce_OpenGL_windows.h b/modules/juce_opengl/native/juce_OpenGL_windows.h index c848eecaf1..e3dcb9ccd3 100644 --- a/modules/juce_opengl/native/juce_OpenGL_windows.h +++ b/modules/juce_opengl/native/juce_OpenGL_windows.h @@ -149,13 +149,13 @@ public: bool setSwapInterval (int numFramesPerSwap) { - jassert (isActive()); // this can only be called when the context is active.. + jassert (isActive()); // this can only be called when the context is active return wglSwapIntervalEXT != nullptr && wglSwapIntervalEXT (numFramesPerSwap) != FALSE; } int getSwapInterval() const { - jassert (isActive()); // this can only be called when the context is active.. + jassert (isActive()); // this can only be called when the context is active return wglGetSwapIntervalEXT != nullptr ? wglGetSwapIntervalEXT() : 0; } diff --git a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp index b824a6b164..5f2025d3b1 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp @@ -466,7 +466,7 @@ private: } // trying to use a framebuffer after saving it with saveAndRelease()! Be sure to call - // reloadSavedCopy() to put it back into GPU memory before using it.. + // reloadSavedCopy() to put it back into GPU memory before using it jassertfalse; return nullptr; diff --git a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp index 043816f6ab..9d6f5f4e79 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLGraphicsContext.cpp @@ -228,7 +228,7 @@ struct Target : context (c), frameBufferID (fb.getFrameBufferID()), bounds (origin.x, origin.y, fb.getWidth(), fb.getHeight()) { - jassert (frameBufferID != 0); // trying to render into an uninitialised framebuffer object. + jassert (frameBufferID != 0); // trying to render into an uninitialised framebuffer object } Target (const Target& other) noexcept @@ -1471,7 +1471,7 @@ struct StateHelpers { context.extensions.glBufferSubData (GL_ARRAY_BUFFER, 0, (GLsizeiptr) ((size_t) numVertices * sizeof (VertexInfo)), vertexData); // NB: If you get a random crash in here and are running in a Parallels VM, it seems to be a bug in - // their driver.. Can't find a workaround unfortunately. + // their driver. Can't find a workaround unfortunately. glDrawElements (GL_TRIANGLES, (numVertices * 3) / 2, GL_UNSIGNED_SHORT, nullptr); JUCE_CHECK_OPENGL_ERROR numVertices = 0; diff --git a/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp b/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp index 818eba0e13..734a68107e 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLHelpers.cpp @@ -139,8 +139,8 @@ void* OpenGLHelpers::getExtensionFunction (const char* functionName) bool OpenGLHelpers::isExtensionSupported (const char* const extensionName) { - jassert (extensionName != nullptr); // you must supply a genuine string for this. - jassert (isContextActive()); // An OpenGL context will need to be active before calling this. + jassert (extensionName != nullptr); // you must supply a genuine string for this + jassert (isContextActive()); // an OpenGL context will need to be active before calling this if (getOpenGLVersion().major >= 3) { diff --git a/modules/juce_opengl/opengl/juce_OpenGLRenderer.h b/modules/juce_opengl/opengl/juce_OpenGLRenderer.h index ae10f240f1..8c47009312 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLRenderer.h +++ b/modules/juce_opengl/opengl/juce_OpenGLRenderer.h @@ -89,7 +89,7 @@ public: that your implementation is thread-safe. (Also note that on Android, this callback won't happen, because there's currently - no way to implement it..) + no way to implement it.) */ virtual void openGLContextClosing() = 0; }; diff --git a/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.h b/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.h index 0afd3bc741..c86f6b6b57 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.h +++ b/modules/juce_opengl/opengl/juce_OpenGLShaderProgram.h @@ -55,7 +55,7 @@ public: @code if (OpenGLShaderProgram::getLanguageVersion() > 1.199) { - // ..do something that requires GLSL 1.2 or above.. + // ...do something that requires GLSL 1.2 or above... } @endcode */ diff --git a/modules/juce_osc/osc/juce_OSCAddress.cpp b/modules/juce_osc/osc/juce_OSCAddress.cpp index c13872cf7e..27495c2b3d 100644 --- a/modules/juce_osc/osc/juce_OSCAddress.cpp +++ b/modules/juce_osc/osc/juce_OSCAddress.cpp @@ -182,7 +182,7 @@ namespace setIsNegated = true; break; } - // else = special case: fall through to default and treat '!' as a non-special character. + // else = special case: fall through to default and treat '!' as a non-special character JUCE_FALLTHROUGH default: @@ -243,7 +243,7 @@ namespace if (rangeEnd == ']') { - set.add ('-'); // special case: '-' has no special meaning at the end. + set.add ('-'); // special case: '-' has no special meaning at the end return true; } @@ -719,7 +719,7 @@ public: expect (matchOscPattern ("foo[1-8]bar", "foo8bar")); expect (! matchOscPattern ("foo[1-8]bar", "foo9bar")); - // special case: '-' does not have a special meaning if it is at the end of the set. + // special case: '-' does not have a special meaning if it is at the end of the set expect (matchOscPattern ("foo[abc-]bar", "fooabar")); expect (matchOscPattern ("foo[abc-]bar", "foo-bar")); @@ -769,7 +769,7 @@ public: expect (! matchOscPattern ("fooba[!r-z]foo", "foobasfoo")); expect (matchOscPattern ("fooba[!r-z]foo", "foobaRfoo")); - // special case: '!' does not have a special meaning if it is not the first char in the set. + // special case: '!' does not have a special meaning if it is not the first char in the set expect (matchOscPattern ("foo[ab!c]bar", "fooabar")); expect (matchOscPattern ("foo[ab!c]bar", "foo!bar")); diff --git a/modules/juce_osc/osc/juce_OSCReceiver.cpp b/modules/juce_osc/osc/juce_OSCReceiver.cpp index 0993ec7500..2f53985c7c 100644 --- a/modules/juce_osc/osc/juce_OSCReceiver.cpp +++ b/modules/juce_osc/osc/juce_OSCReceiver.cpp @@ -169,7 +169,7 @@ namespace const OSCType type = input.readByte(); if (type == 0) - break; // encountered null terminator. list is complete. + break; // encountered null terminator. list is complete if (! OSCTypes::isSupportedType (type)) throw OSCFormatError ("OSC input stream format error: encountered unsupported type tag"); @@ -422,7 +422,7 @@ struct OSCReceiver::Pimpl : private Thread, { CallbackMessage (OSCBundle::Element oscElement) : content (oscElement) {} - // the payload of the message. Can be either an OSCMessage or an OSCBundle. + // The payload of the message. Can be either an OSCMessage or an OSCBundle. OSCBundle::Element content; }; @@ -947,7 +947,7 @@ public: beginTest ("reading OSC messages (contents)"); { - // valid non-empty message. + // valid non-empty message { int32 testInt = -2015; @@ -1128,7 +1128,7 @@ public: expect (! elements[2].getBundle().getTimeTag().isImmediately()); } - // invalid bundles. + // invalid bundles { uint8 data[] = { diff --git a/modules/juce_osc/osc/juce_OSCTimeTag.cpp b/modules/juce_osc/osc/juce_OSCTimeTag.cpp index d19f182607..793c22c446 100644 --- a/modules/juce_osc/osc/juce_OSCTimeTag.cpp +++ b/modules/juce_osc/osc/juce_OSCTimeTag.cpp @@ -144,7 +144,7 @@ public: // in the raw time tag, the most significant 32 bits are seconds, // so let's verify that the difference is right: uint64 diff = laterTimeTagRaw - currentTimeTagRaw; - double acceptableErrorInSeconds = 0.000001; // definitely not audible anymore. + double acceptableErrorInSeconds = 0.000001; // definitely not audible anymore expect ((float) diff / float (1ULL << 32) < deltaInSeconds + acceptableErrorInSeconds ); expect ((float) diff / float (1ULL << 32) > deltaInSeconds - acceptableErrorInSeconds ); diff --git a/modules/juce_video/playback/juce_VideoComponent.cpp b/modules/juce_video/playback/juce_VideoComponent.cpp index e74b6f85db..f0a52f3089 100644 --- a/modules/juce_video/playback/juce_VideoComponent.cpp +++ b/modules/juce_video/playback/juce_VideoComponent.cpp @@ -126,7 +126,7 @@ void VideoComponent::resized() if (nativeSize.isEmpty()) { // if we've just opened the file and are still waiting for it to - // figure out the size, start our timer.. + // figure out the size, start our timer if (! isTimerRunning()) startTimer (50); }