From 1df71a356e9a05a8377720bd9fb02c5b61b8307f Mon Sep 17 00:00:00 2001 From: binary1248 Date: Mon, 3 Apr 2017 01:17:03 +0200 Subject: [PATCH] Apply clang-tidy modernize suggestions. --- include/SFML/Audio/Music.hpp | 6 ++-- include/SFML/Audio/Sound.hpp | 2 +- include/SFML/Audio/SoundBufferRecorder.hpp | 8 ++--- include/SFML/Audio/SoundStream.hpp | 2 +- include/SFML/Graphics/CircleShape.hpp | 4 +-- include/SFML/Graphics/ConvexShape.hpp | 4 +-- include/SFML/Graphics/RectangleShape.hpp | 4 +-- include/SFML/Graphics/RenderTexture.hpp | 6 ++-- include/SFML/Graphics/RenderWindow.hpp | 10 +++---- include/SFML/Graphics/Shape.hpp | 4 +-- include/SFML/Graphics/Sprite.hpp | 2 +- include/SFML/Graphics/Text.hpp | 2 +- include/SFML/Graphics/VertexArray.hpp | 2 +- include/SFML/System/FileInputStream.hpp | 10 +++---- include/SFML/System/MemoryInputStream.hpp | 8 ++--- src/SFML/Audio/SoundFileReaderFlac.hpp | 8 ++--- src/SFML/Audio/SoundFileReaderOgg.hpp | 8 ++--- src/SFML/Audio/SoundFileReaderWav.hpp | 6 ++-- src/SFML/Audio/SoundFileWriterFlac.hpp | 6 ++-- src/SFML/Audio/SoundFileWriterOgg.hpp | 6 ++-- src/SFML/Audio/SoundFileWriterWav.hpp | 6 ++-- .../Graphics/RenderTextureImplDefault.hpp | 6 ++-- src/SFML/Graphics/RenderTextureImplFBO.hpp | 8 ++--- src/SFML/System/Err.cpp | 8 ++--- src/SFML/Window/Android/WindowImplAndroid.hpp | 30 +++++++++---------- src/SFML/Window/EglContext.hpp | 8 ++--- src/SFML/Window/OSX/SFContext.hpp | 8 ++--- src/SFML/Window/OSX/WindowImplCocoa.hpp | 30 +++++++++---------- src/SFML/Window/Unix/GlxContext.hpp | 8 ++--- src/SFML/Window/Unix/InputImpl.cpp | 2 -- src/SFML/Window/Unix/WindowImplX11.hpp | 30 +++++++++---------- src/SFML/Window/Win32/WglContext.hpp | 8 ++--- src/SFML/Window/Win32/WindowImplWin32.hpp | 30 +++++++++---------- src/SFML/Window/iOS/EaglContext.hpp | 8 ++--- src/SFML/Window/iOS/WindowImplUIKit.hpp | 30 +++++++++---------- 35 files changed, 163 insertions(+), 165 deletions(-) diff --git a/include/SFML/Audio/Music.hpp b/include/SFML/Audio/Music.hpp index cf2fe0cd..955fc528 100644 --- a/include/SFML/Audio/Music.hpp +++ b/include/SFML/Audio/Music.hpp @@ -59,7 +59,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~Music(); + ~Music() override; //////////////////////////////////////////////////////////// /// \brief Open a music from an audio file @@ -147,7 +147,7 @@ protected: /// \return True to continue playback, false to stop /// //////////////////////////////////////////////////////////// - virtual bool onGetData(Chunk& data); + bool onGetData(Chunk& data) override; //////////////////////////////////////////////////////////// /// \brief Change the current playing position in the stream source @@ -155,7 +155,7 @@ protected: /// \param timeOffset New playing position, from the beginning of the music /// //////////////////////////////////////////////////////////// - virtual void onSeek(Time timeOffset); + void onSeek(Time timeOffset) override; private: diff --git a/include/SFML/Audio/Sound.hpp b/include/SFML/Audio/Sound.hpp index 3b200240..5f21cf1e 100644 --- a/include/SFML/Audio/Sound.hpp +++ b/include/SFML/Audio/Sound.hpp @@ -72,7 +72,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~Sound(); + ~Sound() override; //////////////////////////////////////////////////////////// /// \brief Start or resume playing the sound diff --git a/include/SFML/Audio/SoundBufferRecorder.hpp b/include/SFML/Audio/SoundBufferRecorder.hpp index b5b6436c..78365665 100644 --- a/include/SFML/Audio/SoundBufferRecorder.hpp +++ b/include/SFML/Audio/SoundBufferRecorder.hpp @@ -49,7 +49,7 @@ public: /// \brief destructor /// //////////////////////////////////////////////////////////// - ~SoundBufferRecorder(); + ~SoundBufferRecorder() override; //////////////////////////////////////////////////////////// /// \brief Get the sound buffer containing the captured audio data @@ -72,7 +72,7 @@ protected: /// \return True to start the capture, or false to abort it /// //////////////////////////////////////////////////////////// - virtual bool onStart(); + bool onStart() override; //////////////////////////////////////////////////////////// /// \brief Process a new chunk of recorded samples @@ -83,13 +83,13 @@ protected: /// \return True to continue the capture, or false to stop it /// //////////////////////////////////////////////////////////// - virtual bool onProcessSamples(const Int16* samples, std::size_t sampleCount); + bool onProcessSamples(const Int16* samples, std::size_t sampleCount) override; //////////////////////////////////////////////////////////// /// \brief Stop capturing audio data /// //////////////////////////////////////////////////////////// - virtual void onStop(); + void onStop() override; private: diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index 70a094a2..4ebb2433 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -60,7 +60,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - virtual ~SoundStream(); + ~SoundStream() override; //////////////////////////////////////////////////////////// /// \brief Start or resume playing the audio stream diff --git a/include/SFML/Graphics/CircleShape.hpp b/include/SFML/Graphics/CircleShape.hpp index 9f689691..f6f0f474 100644 --- a/include/SFML/Graphics/CircleShape.hpp +++ b/include/SFML/Graphics/CircleShape.hpp @@ -89,7 +89,7 @@ public: /// \see setPointCount /// //////////////////////////////////////////////////////////// - virtual std::size_t getPointCount() const; + std::size_t getPointCount() const override; //////////////////////////////////////////////////////////// /// \brief Get a point of the circle @@ -104,7 +104,7 @@ public: /// \return index-th point of the shape /// //////////////////////////////////////////////////////////// - virtual Vector2f getPoint(std::size_t index) const; + Vector2f getPoint(std::size_t index) const override; private: diff --git a/include/SFML/Graphics/ConvexShape.hpp b/include/SFML/Graphics/ConvexShape.hpp index 117f843a..8677ecf0 100644 --- a/include/SFML/Graphics/ConvexShape.hpp +++ b/include/SFML/Graphics/ConvexShape.hpp @@ -71,7 +71,7 @@ public: /// \see setPointCount /// //////////////////////////////////////////////////////////// - virtual std::size_t getPointCount() const; + std::size_t getPointCount() const override; //////////////////////////////////////////////////////////// /// \brief Set the position of a point @@ -105,7 +105,7 @@ public: /// \see setPoint /// //////////////////////////////////////////////////////////// - virtual Vector2f getPoint(std::size_t index) const; + Vector2f getPoint(std::size_t index) const override; private: diff --git a/include/SFML/Graphics/RectangleShape.hpp b/include/SFML/Graphics/RectangleShape.hpp index f9754f69..7b2d677c 100644 --- a/include/SFML/Graphics/RectangleShape.hpp +++ b/include/SFML/Graphics/RectangleShape.hpp @@ -77,7 +77,7 @@ public: /// shapes, this number is always 4. /// //////////////////////////////////////////////////////////// - virtual std::size_t getPointCount() const; + std::size_t getPointCount() const override; //////////////////////////////////////////////////////////// /// \brief Get a point of the rectangle @@ -92,7 +92,7 @@ public: /// \return index-th point of the shape /// //////////////////////////////////////////////////////////// - virtual Vector2f getPoint(std::size_t index) const; + Vector2f getPoint(std::size_t index) const override; private: diff --git a/include/SFML/Graphics/RenderTexture.hpp b/include/SFML/Graphics/RenderTexture.hpp index 040317a3..ccc3f31e 100644 --- a/include/SFML/Graphics/RenderTexture.hpp +++ b/include/SFML/Graphics/RenderTexture.hpp @@ -64,7 +64,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - virtual ~RenderTexture(); + ~RenderTexture() override; //////////////////////////////////////////////////////////// /// \brief Create the render-texture @@ -163,7 +163,7 @@ public: /// \return True if operation was successful, false otherwise /// //////////////////////////////////////////////////////////// - bool setActive(bool active = true); + bool setActive(bool active = true) override; //////////////////////////////////////////////////////////// /// \brief Update the contents of the target texture @@ -185,7 +185,7 @@ public: /// \return Size in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2u getSize() const; + Vector2u getSize() const override; //////////////////////////////////////////////////////////// /// \brief Get a read-only reference to the target texture diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index 609f912a..75231e96 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -99,7 +99,7 @@ public: /// Closes the window and frees all the resources attached to it. /// //////////////////////////////////////////////////////////// - virtual ~RenderWindow(); + ~RenderWindow() override; //////////////////////////////////////////////////////////// /// \brief Get the size of the rendering region of the window @@ -110,7 +110,7 @@ public: /// \return Size in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2u getSize() const; + Vector2u getSize() const override; //////////////////////////////////////////////////////////// /// \brief Activate or deactivate the window as the current target @@ -128,7 +128,7 @@ public: /// \return True if operation was successful, false otherwise /// //////////////////////////////////////////////////////////// - bool setActive(bool active = true); + bool setActive(bool active = true) override; //////////////////////////////////////////////////////////// /// \brief Copy the current contents of the window to an image @@ -167,7 +167,7 @@ protected: /// the window is created. /// //////////////////////////////////////////////////////////// - virtual void onCreate(); + void onCreate() override; //////////////////////////////////////////////////////////// /// \brief Function called after the window has been resized @@ -176,7 +176,7 @@ protected: /// perform custom actions when the size of the window changes. /// //////////////////////////////////////////////////////////// - virtual void onResize(); + void onResize() override; }; } // namespace sf diff --git a/include/SFML/Graphics/Shape.hpp b/include/SFML/Graphics/Shape.hpp index b257ddc8..18f8626f 100644 --- a/include/SFML/Graphics/Shape.hpp +++ b/include/SFML/Graphics/Shape.hpp @@ -49,7 +49,7 @@ public: /// \brief Virtual destructor /// //////////////////////////////////////////////////////////// - virtual ~Shape(); + ~Shape() override; //////////////////////////////////////////////////////////// /// \brief Change the source texture of the shape @@ -274,7 +274,7 @@ private: /// \param states Current render states /// //////////////////////////////////////////////////////////// - virtual void draw(RenderTarget& target, RenderStates states) const; + void draw(RenderTarget& target, RenderStates states) const override; //////////////////////////////////////////////////////////// /// \brief Update the fill vertices' color diff --git a/include/SFML/Graphics/Sprite.hpp b/include/SFML/Graphics/Sprite.hpp index 51bba30c..1791690e 100644 --- a/include/SFML/Graphics/Sprite.hpp +++ b/include/SFML/Graphics/Sprite.hpp @@ -198,7 +198,7 @@ private: /// \param states Current render states /// //////////////////////////////////////////////////////////// - virtual void draw(RenderTarget& target, RenderStates states) const; + void draw(RenderTarget& target, RenderStates states) const override; //////////////////////////////////////////////////////////// /// \brief Update the vertices' positions diff --git a/include/SFML/Graphics/Text.hpp b/include/SFML/Graphics/Text.hpp index 7b7cf611..4d3238d9 100644 --- a/include/SFML/Graphics/Text.hpp +++ b/include/SFML/Graphics/Text.hpp @@ -368,7 +368,7 @@ private: /// \param states Current render states /// //////////////////////////////////////////////////////////// - virtual void draw(RenderTarget& target, RenderStates states) const; + void draw(RenderTarget& target, RenderStates states) const override; //////////////////////////////////////////////////////////// /// \brief Make sure the text's geometry is updated diff --git a/include/SFML/Graphics/VertexArray.hpp b/include/SFML/Graphics/VertexArray.hpp index 109a7e82..ea566571 100644 --- a/include/SFML/Graphics/VertexArray.hpp +++ b/include/SFML/Graphics/VertexArray.hpp @@ -180,7 +180,7 @@ private: /// \param states Current render states /// //////////////////////////////////////////////////////////// - virtual void draw(RenderTarget& target, RenderStates states) const; + void draw(RenderTarget& target, RenderStates states) const override; private: diff --git a/include/SFML/System/FileInputStream.hpp b/include/SFML/System/FileInputStream.hpp index c931dd80..85016e4b 100644 --- a/include/SFML/System/FileInputStream.hpp +++ b/include/SFML/System/FileInputStream.hpp @@ -66,7 +66,7 @@ public: /// \brief Default destructor /// //////////////////////////////////////////////////////////// - virtual ~FileInputStream(); + ~FileInputStream() override; //////////////////////////////////////////////////////////// /// \brief Open the stream from a file path @@ -90,7 +90,7 @@ public: /// \return The number of bytes actually read, or -1 on error /// //////////////////////////////////////////////////////////// - virtual Int64 read(void* data, Int64 size); + Int64 read(void* data, Int64 size) override; //////////////////////////////////////////////////////////// /// \brief Change the current reading position @@ -100,7 +100,7 @@ public: /// \return The position actually sought to, or -1 on error /// //////////////////////////////////////////////////////////// - virtual Int64 seek(Int64 position); + Int64 seek(Int64 position) override; //////////////////////////////////////////////////////////// /// \brief Get the current reading position in the stream @@ -108,7 +108,7 @@ public: /// \return The current position, or -1 on error. /// //////////////////////////////////////////////////////////// - virtual Int64 tell(); + Int64 tell() override; //////////////////////////////////////////////////////////// /// \brief Return the size of the stream @@ -116,7 +116,7 @@ public: /// \return The total number of bytes available in the stream, or -1 on error /// //////////////////////////////////////////////////////////// - virtual Int64 getSize(); + Int64 getSize() override; private: diff --git a/include/SFML/System/MemoryInputStream.hpp b/include/SFML/System/MemoryInputStream.hpp index c26f823d..36d869ea 100644 --- a/include/SFML/System/MemoryInputStream.hpp +++ b/include/SFML/System/MemoryInputStream.hpp @@ -71,7 +71,7 @@ public: /// \return The number of bytes actually read, or -1 on error /// //////////////////////////////////////////////////////////// - virtual Int64 read(void* data, Int64 size); + Int64 read(void* data, Int64 size) override; //////////////////////////////////////////////////////////// /// \brief Change the current reading position @@ -81,7 +81,7 @@ public: /// \return The position actually sought to, or -1 on error /// //////////////////////////////////////////////////////////// - virtual Int64 seek(Int64 position); + Int64 seek(Int64 position) override; //////////////////////////////////////////////////////////// /// \brief Get the current reading position in the stream @@ -89,7 +89,7 @@ public: /// \return The current position, or -1 on error. /// //////////////////////////////////////////////////////////// - virtual Int64 tell(); + Int64 tell() override; //////////////////////////////////////////////////////////// /// \brief Return the size of the stream @@ -97,7 +97,7 @@ public: /// \return The total number of bytes available in the stream, or -1 on error /// //////////////////////////////////////////////////////////// - virtual Int64 getSize(); + Int64 getSize() override; private: diff --git a/src/SFML/Audio/SoundFileReaderFlac.hpp b/src/SFML/Audio/SoundFileReaderFlac.hpp index bde8a197..c5186394 100644 --- a/src/SFML/Audio/SoundFileReaderFlac.hpp +++ b/src/SFML/Audio/SoundFileReaderFlac.hpp @@ -68,7 +68,7 @@ public: /// \brief Default constructor /// //////////////////////////////////////////////////////////// - ~SoundFileReaderFlac(); + ~SoundFileReaderFlac() override; //////////////////////////////////////////////////////////// /// \brief Open a sound file for reading @@ -77,7 +77,7 @@ public: /// \param info Structure to fill with the attributes of the loaded sound /// //////////////////////////////////////////////////////////// - virtual bool open(sf::InputStream& stream, Info& info); + bool open(sf::InputStream& stream, Info& info) override; //////////////////////////////////////////////////////////// /// \brief Change the current read position to the given sample offset @@ -91,7 +91,7 @@ public: /// \param sampleOffset Index of the sample to jump to, relative to the beginning /// //////////////////////////////////////////////////////////// - virtual void seek(Uint64 sampleOffset); + void seek(Uint64 sampleOffset) override; //////////////////////////////////////////////////////////// /// \brief Read audio samples from the open file @@ -102,7 +102,7 @@ public: /// \return Number of samples actually read (may be less than \a maxCount) /// //////////////////////////////////////////////////////////// - virtual Uint64 read(Int16* samples, Uint64 maxCount); + Uint64 read(Int16* samples, Uint64 maxCount) override; public: diff --git a/src/SFML/Audio/SoundFileReaderOgg.hpp b/src/SFML/Audio/SoundFileReaderOgg.hpp index b1bf2529..7e9e3c26 100644 --- a/src/SFML/Audio/SoundFileReaderOgg.hpp +++ b/src/SFML/Audio/SoundFileReaderOgg.hpp @@ -66,7 +66,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~SoundFileReaderOgg(); + ~SoundFileReaderOgg() override; //////////////////////////////////////////////////////////// /// \brief Open a sound file for reading @@ -77,7 +77,7 @@ public: /// \return True if the file was successfully opened /// //////////////////////////////////////////////////////////// - virtual bool open(InputStream& stream, Info& info); + bool open(InputStream& stream, Info& info) override; //////////////////////////////////////////////////////////// /// \brief Change the current read position to the given sample offset @@ -91,7 +91,7 @@ public: /// \param sampleOffset Index of the sample to jump to, relative to the beginning /// //////////////////////////////////////////////////////////// - virtual void seek(Uint64 sampleOffset); + void seek(Uint64 sampleOffset) override; //////////////////////////////////////////////////////////// /// \brief Read audio samples from the open file @@ -102,7 +102,7 @@ public: /// \return Number of samples actually read (may be less than \a maxCount) /// //////////////////////////////////////////////////////////// - virtual Uint64 read(Int16* samples, Uint64 maxCount); + Uint64 read(Int16* samples, Uint64 maxCount) override; private: diff --git a/src/SFML/Audio/SoundFileReaderWav.hpp b/src/SFML/Audio/SoundFileReaderWav.hpp index 904408b2..cab6c7e1 100644 --- a/src/SFML/Audio/SoundFileReaderWav.hpp +++ b/src/SFML/Audio/SoundFileReaderWav.hpp @@ -69,7 +69,7 @@ public: /// \param info Structure to fill with the attributes of the loaded sound /// //////////////////////////////////////////////////////////// - virtual bool open(sf::InputStream& stream, Info& info); + bool open(sf::InputStream& stream, Info& info) override; //////////////////////////////////////////////////////////// /// \brief Change the current read position to the given sample offset @@ -83,7 +83,7 @@ public: /// \param sampleOffset Index of the sample to jump to, relative to the beginning /// //////////////////////////////////////////////////////////// - virtual void seek(Uint64 sampleOffset); + void seek(Uint64 sampleOffset) override; //////////////////////////////////////////////////////////// /// \brief Read audio samples from the open file @@ -94,7 +94,7 @@ public: /// \return Number of samples actually read (may be less than \a maxCount) /// //////////////////////////////////////////////////////////// - virtual Uint64 read(Int16* samples, Uint64 maxCount); + Uint64 read(Int16* samples, Uint64 maxCount) override; private: diff --git a/src/SFML/Audio/SoundFileWriterFlac.hpp b/src/SFML/Audio/SoundFileWriterFlac.hpp index 39f50dbb..f7dec7d2 100644 --- a/src/SFML/Audio/SoundFileWriterFlac.hpp +++ b/src/SFML/Audio/SoundFileWriterFlac.hpp @@ -67,7 +67,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~SoundFileWriterFlac(); + ~SoundFileWriterFlac() override; //////////////////////////////////////////////////////////// /// \brief Open a sound file for writing @@ -79,7 +79,7 @@ public: /// \return True if the file was successfully opened /// //////////////////////////////////////////////////////////// - virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount); + bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) override; //////////////////////////////////////////////////////////// /// \brief Write audio samples to the open file @@ -88,7 +88,7 @@ public: /// \param count Number of samples to write /// //////////////////////////////////////////////////////////// - virtual void write(const Int16* samples, Uint64 count); + void write(const Int16* samples, Uint64 count) override; private: diff --git a/src/SFML/Audio/SoundFileWriterOgg.hpp b/src/SFML/Audio/SoundFileWriterOgg.hpp index 868464a4..e20def71 100644 --- a/src/SFML/Audio/SoundFileWriterOgg.hpp +++ b/src/SFML/Audio/SoundFileWriterOgg.hpp @@ -67,7 +67,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~SoundFileWriterOgg(); + ~SoundFileWriterOgg() override; //////////////////////////////////////////////////////////// /// \brief Open a sound file for writing @@ -79,7 +79,7 @@ public: /// \return True if the file was successfully opened /// //////////////////////////////////////////////////////////// - virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount); + bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) override; //////////////////////////////////////////////////////////// /// \brief Write audio samples to the open file @@ -88,7 +88,7 @@ public: /// \param count Number of samples to write /// //////////////////////////////////////////////////////////// - virtual void write(const Int16* samples, Uint64 count); + void write(const Int16* samples, Uint64 count) override; private: diff --git a/src/SFML/Audio/SoundFileWriterWav.hpp b/src/SFML/Audio/SoundFileWriterWav.hpp index b37a970c..56bc65c6 100644 --- a/src/SFML/Audio/SoundFileWriterWav.hpp +++ b/src/SFML/Audio/SoundFileWriterWav.hpp @@ -67,7 +67,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~SoundFileWriterWav(); + ~SoundFileWriterWav() override; //////////////////////////////////////////////////////////// /// \brief Open a sound file for writing @@ -79,7 +79,7 @@ public: /// \return True if the file was successfully opened /// //////////////////////////////////////////////////////////// - virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount); + bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) override; //////////////////////////////////////////////////////////// /// \brief Write audio samples to the open file @@ -88,7 +88,7 @@ public: /// \param count Number of samples to write /// //////////////////////////////////////////////////////////// - virtual void write(const Int16* samples, Uint64 count); + void write(const Int16* samples, Uint64 count) override; private: diff --git a/src/SFML/Graphics/RenderTextureImplDefault.hpp b/src/SFML/Graphics/RenderTextureImplDefault.hpp index 8d2a8b47..df7f8be9 100644 --- a/src/SFML/Graphics/RenderTextureImplDefault.hpp +++ b/src/SFML/Graphics/RenderTextureImplDefault.hpp @@ -66,7 +66,7 @@ private: /// \return True if creation has been successful /// //////////////////////////////////////////////////////////// - virtual bool create(unsigned int width, unsigned int height, unsigned int textureId, bool depthBuffer); + bool create(unsigned int width, unsigned int height, unsigned int textureId, bool depthBuffer) override; //////////////////////////////////////////////////////////// /// \brief Activate or deactivate the render texture for rendering @@ -76,7 +76,7 @@ private: /// \return True on success, false on failure /// //////////////////////////////////////////////////////////// - virtual bool activate(bool active); + bool activate(bool active) override; //////////////////////////////////////////////////////////// /// \brief Update the pixels of the target texture @@ -84,7 +84,7 @@ private: /// \param textureId OpenGL identifier of the target texture /// //////////////////////////////////////////////////////////// - virtual void updateTexture(unsigned textureId); + void updateTexture(unsigned textureId) override; //////////////////////////////////////////////////////////// // Member data diff --git a/src/SFML/Graphics/RenderTextureImplFBO.hpp b/src/SFML/Graphics/RenderTextureImplFBO.hpp index 321a9878..bc027e7e 100644 --- a/src/SFML/Graphics/RenderTextureImplFBO.hpp +++ b/src/SFML/Graphics/RenderTextureImplFBO.hpp @@ -57,7 +57,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~RenderTextureImplFBO(); + ~RenderTextureImplFBO() override; //////////////////////////////////////////////////////////// /// \brief Check whether the system supports FBOs or not @@ -80,7 +80,7 @@ private: /// \return True if creation has been successful /// //////////////////////////////////////////////////////////// - virtual bool create(unsigned int width, unsigned int height, unsigned int textureId, bool depthBuffer); + bool create(unsigned int width, unsigned int height, unsigned int textureId, bool depthBuffer) override; //////////////////////////////////////////////////////////// /// \brief Activate or deactivate the render texture for rendering @@ -90,7 +90,7 @@ private: /// \return True on success, false on failure /// //////////////////////////////////////////////////////////// - virtual bool activate(bool active); + bool activate(bool active) override; //////////////////////////////////////////////////////////// /// \brief Update the pixels of the target texture @@ -98,7 +98,7 @@ private: /// \param textureId OpenGL identifier of the target texture /// //////////////////////////////////////////////////////////// - virtual void updateTexture(unsigned textureId); + void updateTexture(unsigned textureId) override; //////////////////////////////////////////////////////////// // Member data diff --git a/src/SFML/System/Err.cpp b/src/SFML/System/Err.cpp index d4463251..e39a3f9a 100644 --- a/src/SFML/System/Err.cpp +++ b/src/SFML/System/Err.cpp @@ -43,15 +43,15 @@ public: setp(m_buffer, m_buffer + sizeof(m_buffer)); } - ~DefaultErrStreamBuf() + ~DefaultErrStreamBuf() override { // Synchronize - sync(); + DefaultErrStreamBuf::sync(); } private: - virtual int overflow(int character) + int overflow(int character) override { if ((character != EOF) && (pptr() != epptr())) { @@ -71,7 +71,7 @@ private: } } - virtual int sync() + int sync() override { // Check if there is something into the write buffer if (pbase() != pptr()) diff --git a/src/SFML/Window/Android/WindowImplAndroid.hpp b/src/SFML/Window/Android/WindowImplAndroid.hpp index 88250d41..0b44b87d 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.hpp +++ b/src/SFML/Window/Android/WindowImplAndroid.hpp @@ -70,7 +70,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~WindowImplAndroid(); + ~WindowImplAndroid() override; //////////////////////////////////////////////////////////// /// \brief Get the OS-specific handle of the window @@ -78,7 +78,7 @@ public: /// \return Handle of the window /// //////////////////////////////////////////////////////////// - virtual WindowHandle getSystemHandle() const; + WindowHandle getSystemHandle() const override; //////////////////////////////////////////////////////////// /// \brief Get the position of the window @@ -86,7 +86,7 @@ public: /// \return Position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2i getPosition() const; + Vector2i getPosition() const override; //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen @@ -94,7 +94,7 @@ public: /// \param position New position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual void setPosition(const Vector2i& position); + void setPosition(const Vector2i& position) override; //////////////////////////////////////////////////////////// /// \brief Get the client size of the window @@ -102,7 +102,7 @@ public: /// \return Size of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2u getSize() const; + Vector2u getSize() const override; //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window @@ -110,7 +110,7 @@ public: /// \param size New size, in pixels /// //////////////////////////////////////////////////////////// - virtual void setSize(const Vector2u& size); + void setSize(const Vector2u& size) override; //////////////////////////////////////////////////////////// /// \brief Change the title of the window @@ -118,7 +118,7 @@ public: /// \param title New title /// //////////////////////////////////////////////////////////// - virtual void setTitle(const String& title); + void setTitle(const String& title) override; //////////////////////////////////////////////////////////// /// \brief Change the window's icon @@ -128,7 +128,7 @@ public: /// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits /// //////////////////////////////////////////////////////////// - virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels); + void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the window @@ -136,7 +136,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setVisible(bool visible); + void setVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the mouse cursor @@ -144,7 +144,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorVisible(bool visible); + void setMouseCursorVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Clips or releases the mouse cursor @@ -152,7 +152,7 @@ public: /// \param grabbed True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorGrabbed(bool grabbed); + void setMouseCursorGrabbed(bool grabbed) override; //////////////////////////////////////////////////////////// /// \brief Enable or disable automatic key-repeat @@ -160,14 +160,14 @@ public: /// \param enabled True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setKeyRepeatEnabled(bool enabled); + void setKeyRepeatEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Request the current window to be made the active /// foreground window /// //////////////////////////////////////////////////////////// - virtual void requestFocus(); + void requestFocus() override; //////////////////////////////////////////////////////////// /// \brief Check whether the window has the input focus @@ -175,7 +175,7 @@ public: /// \return True if window has focus, false otherwise /// //////////////////////////////////////////////////////////// - virtual bool hasFocus() const; + bool hasFocus() const override; static void forwardEvent(const Event& event); static WindowImplAndroid* singleInstance; @@ -186,7 +186,7 @@ protected: /// \brief Process incoming events from the operating system /// //////////////////////////////////////////////////////////// - virtual void processEvents(); + void processEvents() override; private: diff --git a/src/SFML/Window/EglContext.hpp b/src/SFML/Window/EglContext.hpp index a889c3ac..f38e018a 100644 --- a/src/SFML/Window/EglContext.hpp +++ b/src/SFML/Window/EglContext.hpp @@ -77,7 +77,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~EglContext(); + ~EglContext() override; //////////////////////////////////////////////////////////// /// \brief Activate the context as the current target @@ -88,13 +88,13 @@ public: /// \return True on success, false if any error happened /// //////////////////////////////////////////////////////////// - virtual bool makeCurrent(bool current); + bool makeCurrent(bool current) override; //////////////////////////////////////////////////////////// /// \brief Display what has been rendered to the context so far /// //////////////////////////////////////////////////////////// - virtual void display(); + void display() override; //////////////////////////////////////////////////////////// /// \brief Enable or disable vertical synchronization @@ -107,7 +107,7 @@ public: /// \param enabled: True to enable v-sync, false to deactivate /// //////////////////////////////////////////////////////////// - virtual void setVerticalSyncEnabled(bool enabled); + void setVerticalSyncEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Create the context diff --git a/src/SFML/Window/OSX/SFContext.hpp b/src/SFML/Window/OSX/SFContext.hpp index 8f020b33..2a1e70d4 100644 --- a/src/SFML/Window/OSX/SFContext.hpp +++ b/src/SFML/Window/OSX/SFContext.hpp @@ -101,7 +101,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~SFContext(); + ~SFContext() override; //////////////////////////////////////////////////////////// /// \brief Get the address of an OpenGL function @@ -117,7 +117,7 @@ public: /// \brief Display what has been rendered to the context so far /// //////////////////////////////////////////////////////////// - virtual void display(); + void display() override; //////////////////////////////////////////////////////////// /// \brief Enable or disable vertical synchronization @@ -130,7 +130,7 @@ public: /// \param enabled True to enable v-sync, false to deactivate /// //////////////////////////////////////////////////////////// - virtual void setVerticalSyncEnabled(bool enabled); + void setVerticalSyncEnabled(bool enabled) override; protected: //////////////////////////////////////////////////////////// @@ -142,7 +142,7 @@ protected: /// \return True on success, false if any error happened /// //////////////////////////////////////////////////////////// - virtual bool makeCurrent(bool current); + bool makeCurrent(bool current) override; private: //////////////////////////////////////////////////////////// diff --git a/src/SFML/Window/OSX/WindowImplCocoa.hpp b/src/SFML/Window/OSX/WindowImplCocoa.hpp index 8daa8f83..c3b5ed77 100644 --- a/src/SFML/Window/OSX/WindowImplCocoa.hpp +++ b/src/SFML/Window/OSX/WindowImplCocoa.hpp @@ -87,7 +87,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~WindowImplCocoa(); + ~WindowImplCocoa() override; //////////////////////////////////////////////////////////// /// \brief Window Closed Event - called by the cocoa window object @@ -245,7 +245,7 @@ public: /// \return Handle of the window /// //////////////////////////////////////////////////////////// - virtual WindowHandle getSystemHandle() const; + WindowHandle getSystemHandle() const override; //////////////////////////////////////////////////////////// /// \brief Get the position of the window @@ -253,7 +253,7 @@ public: /// \return Position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2i getPosition() const; + Vector2i getPosition() const override; //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen @@ -261,7 +261,7 @@ public: /// \param position New position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual void setPosition(const Vector2i& position); + void setPosition(const Vector2i& position) override; //////////////////////////////////////////////////////////// /// \brief Get the client size of the window @@ -269,7 +269,7 @@ public: /// \return Size of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2u getSize() const; + Vector2u getSize() const override; //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window @@ -277,7 +277,7 @@ public: /// \param size New size, in pixels /// //////////////////////////////////////////////////////////// - virtual void setSize(const Vector2u& size); + void setSize(const Vector2u& size) override; //////////////////////////////////////////////////////////// /// \brief Change the title of the window @@ -285,7 +285,7 @@ public: /// \param title New title /// //////////////////////////////////////////////////////////// - virtual void setTitle(const String& title); + void setTitle(const String& title) override; //////////////////////////////////////////////////////////// /// \brief Change the window's icon @@ -295,7 +295,7 @@ public: /// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits /// //////////////////////////////////////////////////////////// - virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels); + void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the window @@ -303,7 +303,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setVisible(bool visible); + void setVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the mouse cursor @@ -311,7 +311,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorVisible(bool visible); + void setMouseCursorVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Grab or release the mouse cursor @@ -319,7 +319,7 @@ public: /// \param grabbed True to grab, false to release /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorGrabbed(bool grabbed); + void setMouseCursorGrabbed(bool grabbed) override; //////////////////////////////////////////////////////////// /// \brief Enable or disable automatic key-repeat @@ -327,14 +327,14 @@ public: /// \param enabled True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setKeyRepeatEnabled(bool enabled); + void setKeyRepeatEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Request the current window to be made the active /// foreground window /// //////////////////////////////////////////////////////////// - virtual void requestFocus(); + void requestFocus() override; //////////////////////////////////////////////////////////// /// \brief Check whether the window has the input focus @@ -342,7 +342,7 @@ public: /// \return True if window has focus, false otherwise /// //////////////////////////////////////////////////////////// - virtual bool hasFocus() const; + bool hasFocus() const override; protected: @@ -350,7 +350,7 @@ protected: /// \brief Process incoming events from the operating system /// //////////////////////////////////////////////////////////// - virtual void processEvents(); + void processEvents() override; private: diff --git a/src/SFML/Window/Unix/GlxContext.hpp b/src/SFML/Window/Unix/GlxContext.hpp index 3991abad..304b0049 100644 --- a/src/SFML/Window/Unix/GlxContext.hpp +++ b/src/SFML/Window/Unix/GlxContext.hpp @@ -79,7 +79,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~GlxContext(); + ~GlxContext() override; //////////////////////////////////////////////////////////// /// \brief Get the address of an OpenGL function @@ -99,13 +99,13 @@ public: /// \return True on success, false if any error happened /// //////////////////////////////////////////////////////////// - virtual bool makeCurrent(bool current); + bool makeCurrent(bool current) override; //////////////////////////////////////////////////////////// /// \brief Display what has been rendered to the context so far /// //////////////////////////////////////////////////////////// - virtual void display(); + void display() override; //////////////////////////////////////////////////////////// /// \brief Enable or disable vertical synchronization @@ -118,7 +118,7 @@ public: /// \param enabled True to enable v-sync, false to deactivate /// //////////////////////////////////////////////////////////// - virtual void setVerticalSyncEnabled(bool enabled); + void setVerticalSyncEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Select the best GLX visual for a given set of settings diff --git a/src/SFML/Window/Unix/InputImpl.cpp b/src/SFML/Window/Unix/InputImpl.cpp index 23c114b2..e5510316 100644 --- a/src/SFML/Window/Unix/InputImpl.cpp +++ b/src/SFML/Window/Unix/InputImpl.cpp @@ -212,8 +212,6 @@ bool InputImpl::isMouseButtonPressed(Mouse::Button button) case Mouse::XButton2: return false; // not supported by X default: return false; } - - return false; } diff --git a/src/SFML/Window/Unix/WindowImplX11.hpp b/src/SFML/Window/Unix/WindowImplX11.hpp index 973a57d3..ff6093ca 100644 --- a/src/SFML/Window/Unix/WindowImplX11.hpp +++ b/src/SFML/Window/Unix/WindowImplX11.hpp @@ -70,7 +70,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~WindowImplX11(); + ~WindowImplX11() override; //////////////////////////////////////////////////////////// /// \brief Get the OS-specific handle of the window @@ -78,7 +78,7 @@ public: /// \return Handle of the window /// //////////////////////////////////////////////////////////// - virtual WindowHandle getSystemHandle() const; + WindowHandle getSystemHandle() const override; //////////////////////////////////////////////////////////// /// \brief Get the position of the window @@ -86,7 +86,7 @@ public: /// \return Position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2i getPosition() const; + Vector2i getPosition() const override; //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen @@ -94,7 +94,7 @@ public: /// \param position New position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual void setPosition(const Vector2i& position); + void setPosition(const Vector2i& position) override; //////////////////////////////////////////////////////////// /// \brief Get the client size of the window @@ -102,7 +102,7 @@ public: /// \return Size of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2u getSize() const; + Vector2u getSize() const override; //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window @@ -110,7 +110,7 @@ public: /// \param size New size, in pixels /// //////////////////////////////////////////////////////////// - virtual void setSize(const Vector2u& size); + void setSize(const Vector2u& size) override; //////////////////////////////////////////////////////////// /// \brief Change the title of the window @@ -118,7 +118,7 @@ public: /// \param title New title /// //////////////////////////////////////////////////////////// - virtual void setTitle(const String& title); + void setTitle(const String& title) override; //////////////////////////////////////////////////////////// /// \brief Change the window's icon @@ -128,7 +128,7 @@ public: /// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits /// //////////////////////////////////////////////////////////// - virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels); + void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the window @@ -136,7 +136,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setVisible(bool visible); + void setVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the mouse cursor @@ -144,7 +144,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorVisible(bool visible); + void setMouseCursorVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Grab or release the mouse cursor @@ -152,7 +152,7 @@ public: /// \param grabbed True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorGrabbed(bool grabbed); + void setMouseCursorGrabbed(bool grabbed) override; //////////////////////////////////////////////////////////// /// \brief Enable or disable automatic key-repeat @@ -160,14 +160,14 @@ public: /// \param enabled True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setKeyRepeatEnabled(bool enabled); + void setKeyRepeatEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Request the current window to be made the active /// foreground window /// //////////////////////////////////////////////////////////// - virtual void requestFocus(); + void requestFocus() override; //////////////////////////////////////////////////////////// /// \brief Check whether the window has the input focus @@ -175,7 +175,7 @@ public: /// \return True if window has focus, false otherwise /// //////////////////////////////////////////////////////////// - virtual bool hasFocus() const; + bool hasFocus() const override; protected: @@ -183,7 +183,7 @@ protected: /// \brief Process incoming events from the operating system /// //////////////////////////////////////////////////////////// - virtual void processEvents(); + void processEvents() override; private: diff --git a/src/SFML/Window/Win32/WglContext.hpp b/src/SFML/Window/Win32/WglContext.hpp index d45de78b..d3a284df 100644 --- a/src/SFML/Window/Win32/WglContext.hpp +++ b/src/SFML/Window/Win32/WglContext.hpp @@ -78,7 +78,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~WglContext(); + ~WglContext() override; //////////////////////////////////////////////////////////// /// \brief Get the address of an OpenGL function @@ -98,13 +98,13 @@ public: /// \return True on success, false if any error happened /// //////////////////////////////////////////////////////////// - virtual bool makeCurrent(bool current); + bool makeCurrent(bool current) override; //////////////////////////////////////////////////////////// /// \brief Display what has been rendered to the context so far /// //////////////////////////////////////////////////////////// - virtual void display(); + void display() override; //////////////////////////////////////////////////////////// /// \brief Enable or disable vertical synchronization @@ -117,7 +117,7 @@ public: /// \param enabled: True to enable v-sync, false to deactivate /// //////////////////////////////////////////////////////////// - virtual void setVerticalSyncEnabled(bool enabled); + void setVerticalSyncEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Select the best pixel format for a given set of settings diff --git a/src/SFML/Window/Win32/WindowImplWin32.hpp b/src/SFML/Window/Win32/WindowImplWin32.hpp index 6c29e0b4..1d255861 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.hpp +++ b/src/SFML/Window/Win32/WindowImplWin32.hpp @@ -69,7 +69,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~WindowImplWin32(); + ~WindowImplWin32() override; //////////////////////////////////////////////////////////// /// \brief Get the OS-specific handle of the window @@ -77,7 +77,7 @@ public: /// \return Handle of the window /// //////////////////////////////////////////////////////////// - virtual WindowHandle getSystemHandle() const; + WindowHandle getSystemHandle() const override; //////////////////////////////////////////////////////////// /// \brief Get the position of the window @@ -85,7 +85,7 @@ public: /// \return Position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2i getPosition() const; + Vector2i getPosition() const override; //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen @@ -93,7 +93,7 @@ public: /// \param position New position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual void setPosition(const Vector2i& position); + void setPosition(const Vector2i& position) override; //////////////////////////////////////////////////////////// /// \brief Get the client size of the window @@ -101,7 +101,7 @@ public: /// \return Size of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2u getSize() const; + Vector2u getSize() const override; //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window @@ -109,7 +109,7 @@ public: /// \param size New size, in pixels /// //////////////////////////////////////////////////////////// - virtual void setSize(const Vector2u& size); + void setSize(const Vector2u& size) override; //////////////////////////////////////////////////////////// /// \brief Change the title of the window @@ -117,7 +117,7 @@ public: /// \param title New title /// //////////////////////////////////////////////////////////// - virtual void setTitle(const String& title); + void setTitle(const String& title) override; //////////////////////////////////////////////////////////// /// \brief Change the window's icon @@ -127,7 +127,7 @@ public: /// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits /// //////////////////////////////////////////////////////////// - virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels); + void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the window @@ -135,7 +135,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setVisible(bool visible); + void setVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the mouse cursor @@ -143,7 +143,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorVisible(bool visible); + void setMouseCursorVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Grab or release the mouse cursor @@ -151,7 +151,7 @@ public: /// \param grabbed True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorGrabbed(bool grabbed); + void setMouseCursorGrabbed(bool grabbed) override; //////////////////////////////////////////////////////////// /// \brief Enable or disable automatic key-repeat @@ -159,14 +159,14 @@ public: /// \param enabled True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setKeyRepeatEnabled(bool enabled); + void setKeyRepeatEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Request the current window to be made the active /// foreground window /// //////////////////////////////////////////////////////////// - virtual void requestFocus(); + void requestFocus() override; //////////////////////////////////////////////////////////// /// \brief Check whether the window has the input focus @@ -174,7 +174,7 @@ public: /// \return True if window has focus, false otherwise /// //////////////////////////////////////////////////////////// - virtual bool hasFocus() const; + bool hasFocus() const override; protected: @@ -182,7 +182,7 @@ protected: /// \brief Process incoming events from the operating system /// //////////////////////////////////////////////////////////// - virtual void processEvents(); + void processEvents() override; private: diff --git a/src/SFML/Window/iOS/EaglContext.hpp b/src/SFML/Window/iOS/EaglContext.hpp index a6853ee1..8eed8f81 100644 --- a/src/SFML/Window/iOS/EaglContext.hpp +++ b/src/SFML/Window/iOS/EaglContext.hpp @@ -88,7 +88,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~EaglContext(); + ~EaglContext() override; //////////////////////////////////////////////////////////// /// \brief Recreate the render buffers of the context @@ -105,7 +105,7 @@ public: /// \brief Display what has been rendered to the context so far /// //////////////////////////////////////////////////////////// - virtual void display(); + void display() override; //////////////////////////////////////////////////////////// /// \brief Enable or disable vertical synchronization @@ -118,7 +118,7 @@ public: /// \param enabled: True to enable v-sync, false to deactivate /// //////////////////////////////////////////////////////////// - virtual void setVerticalSyncEnabled(bool enabled); + void setVerticalSyncEnabled(bool enabled) override; protected: @@ -131,7 +131,7 @@ protected: /// \return True on success, false if any error happened /// //////////////////////////////////////////////////////////// - virtual bool makeCurrent(bool current); + bool makeCurrent(bool current) override; private: diff --git a/src/SFML/Window/iOS/WindowImplUIKit.hpp b/src/SFML/Window/iOS/WindowImplUIKit.hpp index 51e890a7..052c6d6d 100644 --- a/src/SFML/Window/iOS/WindowImplUIKit.hpp +++ b/src/SFML/Window/iOS/WindowImplUIKit.hpp @@ -73,7 +73,7 @@ public: /// \brief Destructor /// //////////////////////////////////////////////////////////// - ~WindowImplUIKit(); + ~WindowImplUIKit() override; //////////////////////////////////////////////////////////// /// \brief Get the OS-specific handle of the window @@ -81,7 +81,7 @@ public: /// \return Handle of the window /// //////////////////////////////////////////////////////////// - virtual WindowHandle getSystemHandle() const; + WindowHandle getSystemHandle() const override; //////////////////////////////////////////////////////////// /// \brief Get the position of the window @@ -89,7 +89,7 @@ public: /// \return Position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2i getPosition() const; + Vector2i getPosition() const override; //////////////////////////////////////////////////////////// /// \brief Change the position of the window on screen @@ -97,7 +97,7 @@ public: /// \param position New position of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual void setPosition(const Vector2i& position); + void setPosition(const Vector2i& position) override; //////////////////////////////////////////////////////////// /// \brief Get the client size of the window @@ -105,7 +105,7 @@ public: /// \return Size of the window, in pixels /// //////////////////////////////////////////////////////////// - virtual Vector2u getSize() const; + Vector2u getSize() const override; //////////////////////////////////////////////////////////// /// \brief Change the size of the rendering region of the window @@ -113,7 +113,7 @@ public: /// \param size New size, in pixels /// //////////////////////////////////////////////////////////// - virtual void setSize(const Vector2u& size); + void setSize(const Vector2u& size) override; //////////////////////////////////////////////////////////// /// \brief Change the title of the window @@ -121,7 +121,7 @@ public: /// \param title New title /// //////////////////////////////////////////////////////////// - virtual void setTitle(const String& title); + void setTitle(const String& title) override; //////////////////////////////////////////////////////////// /// \brief Change the window's icon @@ -131,7 +131,7 @@ public: /// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits /// //////////////////////////////////////////////////////////// - virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels); + void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the window @@ -139,7 +139,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setVisible(bool visible); + void setVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Show or hide the mouse cursor @@ -147,7 +147,7 @@ public: /// \param visible True to show, false to hide /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorVisible(bool visible); + void setMouseCursorVisible(bool visible) override; //////////////////////////////////////////////////////////// /// \brief Clips or releases the mouse cursor @@ -155,7 +155,7 @@ public: /// \param grabbed True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setMouseCursorGrabbed(bool grabbed); + void setMouseCursorGrabbed(bool grabbed) override; //////////////////////////////////////////////////////////// /// \brief Enable or disable automatic key-repeat @@ -163,14 +163,14 @@ public: /// \param enabled True to enable, false to disable /// //////////////////////////////////////////////////////////// - virtual void setKeyRepeatEnabled(bool enabled); + void setKeyRepeatEnabled(bool enabled) override; //////////////////////////////////////////////////////////// /// \brief Request the current window to be made the active /// foreground window /// //////////////////////////////////////////////////////////// - virtual void requestFocus(); + void requestFocus() override; //////////////////////////////////////////////////////////// /// \brief Check whether the window has the input focus @@ -178,7 +178,7 @@ public: /// \return True if window has focus, false otherwise /// //////////////////////////////////////////////////////////// - virtual bool hasFocus() const; + bool hasFocus() const override; public: @@ -212,7 +212,7 @@ protected: /// \brief Process incoming events from the operating system /// //////////////////////////////////////////////////////////// - virtual void processEvents(); + void processEvents() override; private: