From 4ce1908f79540ee45c8d6545fdb10f8b3207842b Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 9 Jul 2013 20:25:46 +0100 Subject: [PATCH] Misc tidying-up. --- .../Source/Application/jucer_Application.h | 20 ++++----- .../Source/Application/jucer_MainWindow.h | 18 ++++---- .../audio_cd/juce_AudioCDReader.h | 2 +- .../codecs/juce_AiffAudioFormat.cpp | 6 +-- .../codecs/juce_AiffAudioFormat.h | 17 ++++--- .../codecs/juce_CoreAudioFormat.cpp | 2 +- .../codecs/juce_CoreAudioFormat.h | 12 ++--- .../codecs/juce_FlacAudioFormat.cpp | 4 +- .../codecs/juce_FlacAudioFormat.h | 16 +++---- .../codecs/juce_MP3AudioFormat.cpp | 2 +- .../codecs/juce_MP3AudioFormat.h | 16 +++---- .../codecs/juce_OggVorbisAudioFormat.cpp | 4 +- .../codecs/juce_OggVorbisAudioFormat.h | 16 +++---- .../codecs/juce_WavAudioFormat.cpp | 8 ++-- .../codecs/juce_WavAudioFormat.h | 14 +++--- .../codecs/juce_WindowsMediaAudioFormat.cpp | 2 +- .../codecs/juce_WindowsMediaAudioFormat.h | 12 ++--- .../format/juce_AudioSubsectionReader.h | 4 +- .../format/juce_BufferingAudioFormatReader.h | 2 +- modules/juce_core/network/juce_Socket.cpp | 45 ++++++++++--------- .../application/juce_Application.cpp | 2 +- .../buttons/juce_HyperlinkButton.h | 8 ++-- .../buttons/juce_ImageButton.h | 6 +-- .../juce_gui_basics/drawables/juce_Drawable.h | 2 +- .../drawables/juce_DrawableComposite.h | 6 +-- .../layout/juce_TabbedButtonBar.h | 4 +- .../windows/juce_TopLevelWindow.h | 6 +-- .../playback/juce_QuickTimeMovieComponent.h | 4 +- 28 files changed, 129 insertions(+), 131 deletions(-) diff --git a/extras/Introjucer/Source/Application/jucer_Application.h b/extras/Introjucer/Source/Application/jucer_Application.h index 2ae00fec4d..2fde52b5f8 100644 --- a/extras/Introjucer/Source/Application/jucer_Application.h +++ b/extras/Introjucer/Source/Application/jucer_Application.h @@ -43,7 +43,7 @@ public: IntrojucerApp() : isRunningCommandLine (false) {} //============================================================================== - void initialise (const String& commandLine) + void initialise (const String& commandLine) override { LookAndFeel::setDefaultLookAndFeel (&lookAndFeel); settings = new StoredSettings(); @@ -109,7 +109,7 @@ public: (new ModuleFolderChecker())->post(); } - void shutdown() + void shutdown() override { appearanceEditorWindow = nullptr; utf8Window = nullptr; @@ -133,7 +133,7 @@ public: } //============================================================================== - void systemRequestedQuit() + void systemRequestedQuit() override { closeModalCompsAndQuit(); } @@ -152,15 +152,15 @@ public: } //============================================================================== - const String getApplicationName() { return "Introjucer"; } - const String getApplicationVersion() { return ProjectInfo::versionString; } + const String getApplicationName() override { return "Introjucer"; } + const String getApplicationVersion() override { return ProjectInfo::versionString; } - bool moreThanOneInstanceAllowed() + bool moreThanOneInstanceAllowed() override { return true; // this is handled manually in initialise() } - void anotherInstanceStarted (const String& commandLine) + void anotherInstanceStarted (const String& commandLine) override { openFile (commandLine.unquoted()); } @@ -347,7 +347,7 @@ public: } //============================================================================== - void getAllCommands (Array & commands) + void getAllCommands (Array & commands) override { JUCEApplication::getAllCommands (commands); @@ -362,7 +362,7 @@ public: commands.addArray (ids, numElementsInArray (ids)); } - void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) + void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) override { switch (commandID) { @@ -404,7 +404,7 @@ public: } } - bool perform (const InvocationInfo& info) + bool perform (const InvocationInfo& info) override { switch (info.commandID) { diff --git a/extras/Introjucer/Source/Application/jucer_MainWindow.h b/extras/Introjucer/Source/Application/jucer_MainWindow.h index 61468a401f..e9e553f407 100644 --- a/extras/Introjucer/Source/Application/jucer_MainWindow.h +++ b/extras/Introjucer/Source/Application/jucer_MainWindow.h @@ -43,7 +43,7 @@ public: ~MainWindow(); //============================================================================== - void closeButtonPressed(); + void closeButtonPressed() override; //============================================================================== bool canOpenFile (const File& file) const; @@ -58,23 +58,23 @@ public: void showNewProjectWizard(); - bool isInterestedInFileDrag (const StringArray& files); - void filesDropped (const StringArray& filenames, int mouseX, int mouseY); + bool isInterestedInFileDrag (const StringArray& files) override; + void filesDropped (const StringArray& filenames, int mouseX, int mouseY) override; - void activeWindowStatusChanged(); + void activeWindowStatusChanged() override; void updateTitle (const String& documentName); ProjectContentComponent* getProjectContentComponent() const; //============================================================================== - ApplicationCommandTarget* getNextCommandTarget(); - void getAllCommands (Array & commands); - void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result); - bool perform (const InvocationInfo& info); + ApplicationCommandTarget* getNextCommandTarget() override; + void getAllCommands (Array & commands) override; + void getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) override; + bool perform (const InvocationInfo& info) override; bool shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::SourceDetails& sourceDetails, - StringArray& files, bool& canMoveFiles); + StringArray& files, bool& canMoveFiles) override; private: ScopedPointer currentProject; diff --git a/modules/juce_audio_devices/audio_cd/juce_AudioCDReader.h b/modules/juce_audio_devices/audio_cd/juce_AudioCDReader.h index 3b322a62c9..ca703616fa 100644 --- a/modules/juce_audio_devices/audio_cd/juce_AudioCDReader.h +++ b/modules/juce_audio_devices/audio_cd/juce_AudioCDReader.h @@ -67,7 +67,7 @@ public: /** Implementation of the AudioFormatReader method. */ bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples); + int64 startSampleInFile, int numSamples) override; /** Checks whether the CD has been removed from the drive. */ bool isCDStillPresent() const; diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp index 9a8d8dd2e2..1687ea9aac 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.cpp @@ -540,7 +540,7 @@ public: //============================================================================== bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer, startSampleInFile, numSamples, lengthInSamples); @@ -643,7 +643,7 @@ public: } //============================================================================== - bool write (const int** data, int numSamples) + bool write (const int** data, int numSamples) override { jassert (data != nullptr && *data != nullptr); // the input must contain at least one channel! @@ -800,7 +800,7 @@ public: } bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer, startSampleInFile, numSamples, lengthInSamples); diff --git a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h index 518bce5bc7..01d1484b43 100644 --- a/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_AiffAudioFormat.h @@ -57,28 +57,27 @@ public: static const char* const appleKey; //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); + Array getPossibleSampleRates() override; + Array getPossibleBitDepths() override; + bool canDoStereo() override; + bool canDoMono() override; #if JUCE_MAC - bool canHandleFile (const File& fileToTest); + bool canHandleFile (const File& fileToTest) override; #endif //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails) override; - MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&); + MemoryMappedAudioFormatReader* createMemoryMappedReader (const File&) override; AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray& metadataValues, - int qualityOptionIndex); - + int qualityOptionIndex) override; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AiffAudioFormat) diff --git a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp index fb1e1b156d..2efe1294c5 100644 --- a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.cpp @@ -360,7 +360,7 @@ public: //============================================================================== bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer, startSampleInFile, numSamples, lengthInSamples); diff --git a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.h b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.h index fab035702b..2a439c61fc 100644 --- a/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_CoreAudioFormat.h @@ -52,21 +52,21 @@ public: static const char* const timeSig; //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); + Array getPossibleSampleRates() override; + Array getPossibleBitDepths() override; + bool canDoStereo() override; + bool canDoMono() override; //============================================================================== AudioFormatReader* createReaderFor (InputStream*, - bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails) override; AudioFormatWriter* createWriterFor (OutputStream*, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray& metadataValues, - int qualityOptionIndex); + int qualityOptionIndex) override; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CoreAudioFormat) diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp index ceac5a8ff0..6f33c721fd 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.cpp @@ -145,7 +145,7 @@ public: // returns the number of samples read bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { using namespace FlacNamespace; @@ -355,7 +355,7 @@ public: } //============================================================================== - bool write (const int** samplesToWrite, int numSamples) + bool write (const int** samplesToWrite, int numSamples) override { using namespace FlacNamespace; if (! ok) diff --git a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.h b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.h index e6a4b02939..20bf094f9e 100644 --- a/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_FlacAudioFormat.h @@ -40,23 +40,23 @@ public: ~FlacAudioFormat(); //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); - bool isCompressed(); - StringArray getQualityOptions(); + Array getPossibleSampleRates() override; + Array getPossibleBitDepths() override; + bool canDoStereo() override; + bool canDoMono() override; + bool isCompressed() override; + StringArray getQualityOptions() override; //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails) override; AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray& metadataValues, - int qualityOptionIndex); + int qualityOptionIndex) override; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FlacAudioFormat) }; diff --git a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp index a4588f9a10..1b4c6bf5a7 100644 --- a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.cpp @@ -2954,7 +2954,7 @@ public: //============================================================================== bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { jassert (destSamples != nullptr); diff --git a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h index 310a9ab25a..e89c05db3a 100644 --- a/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_MP3AudioFormat.h @@ -46,19 +46,19 @@ public: ~MP3AudioFormat(); //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); - bool isCompressed(); - StringArray getQualityOptions(); + Array getPossibleSampleRates() override; + Array getPossibleBitDepths() override; + bool canDoStereo() override; + bool canDoMono() override; + bool isCompressed() override; + StringArray getQualityOptions() override; //============================================================================== - AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails); + AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails) override; AudioFormatWriter* createWriterFor (OutputStream*, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, - const StringPairArray& metadataValues, int qualityOptionIndex); + const StringPairArray& metadataValues, int qualityOptionIndex) override; }; #endif diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp index a4d66d3b35..1f85ff27d8 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.cpp @@ -142,7 +142,7 @@ public: //============================================================================== bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { while (numSamples > 0) { @@ -341,7 +341,7 @@ public: } //============================================================================== - bool write (const int** samplesToWrite, int numSamples) + bool write (const int** samplesToWrite, int numSamples) override { if (ok) { diff --git a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h index 9c803842a4..03bc3fb6d6 100644 --- a/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_OggVorbisAudioFormat.h @@ -40,12 +40,12 @@ public: ~OggVorbisAudioFormat(); //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); - bool isCompressed(); - StringArray getQualityOptions(); + Array getPossibleSampleRates() override; + Array getPossibleBitDepths() override; + bool canDoStereo() override; + bool canDoMono() override; + bool isCompressed() override; + StringArray getQualityOptions() override; //============================================================================== /** Tries to estimate the quality level of an ogg file based on its size. @@ -76,14 +76,14 @@ public: //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails) override; AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray& metadataValues, - int qualityOptionIndex); + int qualityOptionIndex) override; private: JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (OggVorbisAudioFormat) diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp index 406fa34be1..5e1212f6a4 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.cpp @@ -767,7 +767,7 @@ public: //============================================================================== bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer, startSampleInFile, numSamples, lengthInSamples); @@ -870,7 +870,7 @@ public: } //============================================================================== - bool write (const int** data, int numSamples) + bool write (const int** data, int numSamples) override { jassert (data != nullptr && *data != nullptr); // the input must contain at least one channel! @@ -1066,7 +1066,7 @@ public: } bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { clearSamplesBeyondAvailableLength (destSamples, numDestChannels, startOffsetInDestBuffer, startSampleInFile, numSamples, lengthInSamples); @@ -1084,7 +1084,7 @@ public: } void readMaxLevels (int64 startSampleInFile, int64 numSamples, - float& min0, float& max0, float& min1, float& max1) + float& min0, float& max0, float& min1, float& max1) override { if (numSamples <= 0) { diff --git a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h index 1f35537cce..a45a683f2a 100644 --- a/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_WavAudioFormat.h @@ -132,23 +132,23 @@ public: static const char* const acidTempo; //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); + Array getPossibleSampleRates() override; + Array getPossibleBitDepths() override; + bool canDoStereo() override; + bool canDoMono() override; //============================================================================== AudioFormatReader* createReaderFor (InputStream* sourceStream, - bool deleteStreamIfOpeningFails); + bool deleteStreamIfOpeningFails) override; - MemoryMappedAudioFormatReader* createMemoryMappedReader (const File& file); + MemoryMappedAudioFormatReader* createMemoryMappedReader (const File& file) override; AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, const StringPairArray& metadataValues, - int qualityOptionIndex); + int qualityOptionIndex) override; //============================================================================== /** Utility function to replace the metadata in a wav file with a new set of values. diff --git a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp index 7c8215d07b..a4d45ea8a3 100644 --- a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp +++ b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.cpp @@ -161,7 +161,7 @@ public: } bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples) + int64 startSampleInFile, int numSamples) override { if (sampleRate <= 0) return false; diff --git a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.h b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.h index e50c2d6570..b5b355f65b 100644 --- a/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.h +++ b/modules/juce_audio_formats/codecs/juce_WindowsMediaAudioFormat.h @@ -36,17 +36,17 @@ public: ~WindowsMediaAudioFormat(); //============================================================================== - Array getPossibleSampleRates(); - Array getPossibleBitDepths(); - bool canDoStereo(); - bool canDoMono(); + Array getPossibleSampleRates() override; + Array getPossibleBitDepths() override; + bool canDoStereo() override; + bool canDoMono() override; //============================================================================== - AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails); + AudioFormatReader* createReaderFor (InputStream*, bool deleteStreamIfOpeningFails) override; AudioFormatWriter* createWriterFor (OutputStream*, double sampleRateToUse, unsigned int numberOfChannels, int bitsPerSample, - const StringPairArray& metadataValues, int qualityOptionIndex); + const StringPairArray& metadataValues, int qualityOptionIndex) override; }; #endif diff --git a/modules/juce_audio_formats/format/juce_AudioSubsectionReader.h b/modules/juce_audio_formats/format/juce_AudioSubsectionReader.h index 4c6919dca5..668dc73f5a 100644 --- a/modules/juce_audio_formats/format/juce_AudioSubsectionReader.h +++ b/modules/juce_audio_formats/format/juce_AudioSubsectionReader.h @@ -67,14 +67,14 @@ public: //============================================================================== bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples); + int64 startSampleInFile, int numSamples) override; void readMaxLevels (int64 startSample, int64 numSamples, float& lowestLeft, float& highestLeft, float& lowestRight, - float& highestRight); + float& highestRight) override; private: diff --git a/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h b/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h index 9d52aae4a8..fba01e86ed 100644 --- a/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h +++ b/modules/juce_audio_formats/format/juce_BufferingAudioFormatReader.h @@ -60,7 +60,7 @@ public: void setReadTimeout (int timeoutMilliseconds) noexcept; bool readSamples (int** destSamples, int numDestChannels, int startOffsetInDestBuffer, - int64 startSampleInFile, int numSamples); + int64 startSampleInFile, int numSamples) override; private: ScopedPointer source; diff --git a/modules/juce_core/network/juce_Socket.cpp b/modules/juce_core/network/juce_Socket.cpp index 3bb59187bc..c902d414dc 100644 --- a/modules/juce_core/network/juce_Socket.cpp +++ b/modules/juce_core/network/juce_Socket.cpp @@ -103,7 +103,8 @@ namespace SocketHelpers #if JUCE_WINDOWS bytesThisTime = recv (handle, static_cast (destBuffer) + bytesRead, maxBytesToRead - bytesRead, 0); #else - while ((bytesThisTime = (int) ::read (handle, addBytesToPointer (destBuffer, bytesRead), (size_t) (maxBytesToRead - bytesRead))) < 0 + while ((bytesThisTime = (int) ::read (handle, addBytesToPointer (destBuffer, bytesRead), + (size_t) (maxBytesToRead - bytesRead))) < 0 && errno == EINTR && connected) { @@ -274,17 +275,15 @@ StreamingSocket::StreamingSocket() SocketHelpers::initSockets(); } -StreamingSocket::StreamingSocket (const String& hostName_, - const int portNumber_, - const int handle_) - : hostName (hostName_), - portNumber (portNumber_), - handle (handle_), +StreamingSocket::StreamingSocket (const String& host, int portNum, int h) + : hostName (host), + portNumber (portNum), + handle (h), connected (true), isListener (false) { SocketHelpers::initSockets(); - SocketHelpers::resetSocketOptions (handle_, false, false); + SocketHelpers::resetSocketOptions (h, false, false); } StreamingSocket::~StreamingSocket() @@ -293,9 +292,11 @@ StreamingSocket::~StreamingSocket() } //============================================================================== -int StreamingSocket::read (void* destBuffer, const int maxBytesToRead, const bool blockUntilSpecifiedAmountHasArrived) +int StreamingSocket::read (void* destBuffer, const int maxBytesToRead, + const bool blockUntilSpecifiedAmountHasArrived) { - return (connected && ! isListener) ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, connected, blockUntilSpecifiedAmountHasArrived) + return (connected && ! isListener) ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, + connected, blockUntilSpecifiedAmountHasArrived) : -1; } @@ -433,8 +434,9 @@ bool StreamingSocket::createListener (const int newPortNumber, const String& loc StreamingSocket* StreamingSocket::waitForNextConnection() const { - jassert (isListener || ! connected); // to call this method, you first have to use createListener() to - // prepare this socket as a listener. + // To call this method, you first have to use createListener() to + // prepare this socket as a listener. + jassert (isListener || ! connected); if (connected && isListener) { @@ -458,11 +460,11 @@ bool StreamingSocket::isLocal() const noexcept //============================================================================== //============================================================================== -DatagramSocket::DatagramSocket (const int localPortNumber, const bool allowBroadcast_) +DatagramSocket::DatagramSocket (const int localPortNumber, const bool canBroadcast) : portNumber (0), handle (-1), connected (true), - allowBroadcast (allowBroadcast_), + allowBroadcast (canBroadcast), serverAddress (nullptr) { SocketHelpers::initSockets(); @@ -471,18 +473,18 @@ DatagramSocket::DatagramSocket (const int localPortNumber, const bool allowBroad bindToPort (localPortNumber); } -DatagramSocket::DatagramSocket (const String& hostName_, const int portNumber_, - const int handle_, const int localPortNumber) - : hostName (hostName_), - portNumber (portNumber_), - handle (handle_), +DatagramSocket::DatagramSocket (const String& host, const int portNum, + const int h, const int localPortNumber) + : hostName (host), + portNumber (portNum), + handle (h), connected (true), allowBroadcast (false), serverAddress (nullptr) { SocketHelpers::initSockets(); - SocketHelpers::resetSocketOptions (handle_, true, allowBroadcast); + SocketHelpers::resetSocketOptions (h, true, allowBroadcast); bindToPort (localPortNumber); } @@ -564,7 +566,8 @@ int DatagramSocket::waitUntilReady (const bool readyForReading, int DatagramSocket::read (void* destBuffer, const int maxBytesToRead, const bool blockUntilSpecifiedAmountHasArrived) { - return connected ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, connected, blockUntilSpecifiedAmountHasArrived) + return connected ? SocketHelpers::readSocket (handle, destBuffer, maxBytesToRead, + connected, blockUntilSpecifiedAmountHasArrived) : -1; } diff --git a/modules/juce_gui_basics/application/juce_Application.cpp b/modules/juce_gui_basics/application/juce_Application.cpp index f92afde2cf..63cf8c1954 100644 --- a/modules/juce_gui_basics/application/juce_Application.cpp +++ b/modules/juce_gui_basics/application/juce_Application.cpp @@ -53,7 +53,7 @@ public: return true; } - void actionListenerCallback (const String& message) + void actionListenerCallback (const String& message) override { if (JUCEApplication* const app = JUCEApplication::getInstance()) { diff --git a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h index 52a5133ab1..e39aec79b6 100644 --- a/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h +++ b/modules/juce_gui_basics/buttons/juce_HyperlinkButton.h @@ -95,13 +95,11 @@ public: protected: //============================================================================== /** @internal */ - void clicked(); + void clicked() override; /** @internal */ - void colourChanged(); + void colourChanged() override; /** @internal */ - void paintButton (Graphics& g, - bool isMouseOverButton, - bool isButtonDown); + void paintButton (Graphics&, bool isMouseOver, bool isButtonDown) override; private: //============================================================================== diff --git a/modules/juce_gui_basics/buttons/juce_ImageButton.h b/modules/juce_gui_basics/buttons/juce_ImageButton.h index b2b726087f..b32c3fd6a8 100644 --- a/modules/juce_gui_basics/buttons/juce_ImageButton.h +++ b/modules/juce_gui_basics/buttons/juce_ImageButton.h @@ -129,11 +129,9 @@ public: protected: //============================================================================== /** @internal */ - bool hitTest (int x, int y); + bool hitTest (int x, int y) override; /** @internal */ - void paintButton (Graphics& g, - bool isMouseOverButton, - bool isButtonDown); + void paintButton (Graphics&, bool isMouseOver, bool isButtonDown) override; private: //============================================================================== diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.h b/modules/juce_gui_basics/drawables/juce_Drawable.h index d5aac824cd..78a4cd281d 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.h +++ b/modules/juce_gui_basics/drawables/juce_Drawable.h @@ -211,7 +211,7 @@ protected: /** @internal */ void transformContextToCorrectOrigin (Graphics&); /** @internal */ - void parentHierarchyChanged(); + void parentHierarchyChanged() override; /** @internal */ void setBoundsToEnclose (const Rectangle&); diff --git a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h index b9851c5fd3..d868219c15 100644 --- a/modules/juce_gui_basics/drawables/juce_DrawableComposite.h +++ b/modules/juce_gui_basics/drawables/juce_DrawableComposite.h @@ -107,11 +107,11 @@ public: /** @internal */ Rectangle getDrawableBounds() const; /** @internal */ - void childBoundsChanged (Component*); + void childBoundsChanged (Component*) override; /** @internal */ - void childrenChanged(); + void childrenChanged() override; /** @internal */ - void parentHierarchyChanged(); + void parentHierarchyChanged() override; /** @internal */ MarkerList* getMarkers (bool xAxis); diff --git a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h index 3c0a577cb7..6daf7e4434 100644 --- a/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h +++ b/modules/juce_gui_basics/layout/juce_TabbedButtonBar.h @@ -296,9 +296,9 @@ public: //============================================================================== /** @internal */ - void resized(); + void resized() override; /** @internal */ - void lookAndFeelChanged(); + void lookAndFeelChanged() override; protected: //============================================================================== diff --git a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h index 39610f13ba..5c9880d76c 100644 --- a/modules/juce_gui_basics/windows/juce_TopLevelWindow.h +++ b/modules/juce_gui_basics/windows/juce_TopLevelWindow.h @@ -140,15 +140,15 @@ protected: //============================================================================== /** @internal */ - void focusOfChildComponentChanged (FocusChangeType cause); + void focusOfChildComponentChanged (FocusChangeType) override; /** @internal */ - void parentHierarchyChanged(); + void parentHierarchyChanged() override; /** @internal */ virtual int getDesktopWindowStyleFlags() const; /** @internal */ void recreateDesktopWindow(); /** @internal */ - void visibilityChanged(); + void visibilityChanged() override; private: friend class TopLevelWindowManager; diff --git a/modules/juce_video/playback/juce_QuickTimeMovieComponent.h b/modules/juce_video/playback/juce_QuickTimeMovieComponent.h index da739b1725..dbc63ff0c1 100644 --- a/modules/juce_video/playback/juce_QuickTimeMovieComponent.h +++ b/modules/juce_video/playback/juce_QuickTimeMovieComponent.h @@ -205,8 +205,8 @@ private: bool movieLoaded, controllerVisible, looping; #if JUCE_WINDOWS - void parentHierarchyChanged(); - void visibilityChanged(); + void parentHierarchyChanged() override; + void visibilityChanged() override; void createControlIfNeeded(); bool isControlCreated() const;