Apply clang-tidy modernize suggestions.

This commit is contained in:
binary1248 2017-04-03 01:17:03 +02:00
parent 9d2bfcc334
commit 1df71a356e
35 changed files with 163 additions and 165 deletions

View file

@ -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:

View file

@ -72,7 +72,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~Sound();
~Sound() override;
////////////////////////////////////////////////////////////
/// \brief Start or resume playing the sound

View file

@ -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:

View file

@ -60,7 +60,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
virtual ~SoundStream();
~SoundStream() override;
////////////////////////////////////////////////////////////
/// \brief Start or resume playing the audio stream

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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: