Use 'override' whenever possible instead of 'virtual'

This commit is contained in:
Vittorio Romeo 2021-12-09 00:37:49 +00:00 committed by Lukas Dürrenberger
parent a23076d7bb
commit d12a2cd319
48 changed files with 224 additions and 223 deletions

View File

@ -66,6 +66,7 @@ function(set_file_warnings)
-Wdouble-promotion # warn if float is implicit promoted to double -Wdouble-promotion # warn if float is implicit promoted to double
-Wformat=2 # warn on security issues around functions that format output (ie printf) -Wformat=2 # warn on security issues around functions that format output (ie printf)
-Wimplicit-fallthrough # warn when a missing break causes control flow to continue at the next case in a switch statement -Wimplicit-fallthrough # warn when a missing break causes control flow to continue at the next case in a switch statement
-Wsuggest-override # warn when 'override' could be used on a member function overriding a virtual function
${NON_ANDROID_CLANG_AND_GCC_WARNINGS} ${NON_ANDROID_CLANG_AND_GCC_WARNINGS}
) )

View File

@ -16,7 +16,7 @@ class Effect : public sf::Drawable
{ {
public: public:
virtual ~Effect() ~Effect() override
{ {
} }
@ -41,7 +41,7 @@ public:
onUpdate(time, x, y); onUpdate(time, x, y);
} }
void draw(sf::RenderTarget& target, sf::RenderStates states) const void draw(sf::RenderTarget& target, sf::RenderStates states) const override
{ {
if (m_isLoaded) if (m_isLoaded)
{ {

View File

@ -21,7 +21,7 @@ public:
{ {
} }
bool onLoad() bool onLoad() override
{ {
// Load the texture and initialize the sprite // Load the texture and initialize the sprite
if (!m_texture.loadFromFile("resources/background.jpg")) if (!m_texture.loadFromFile("resources/background.jpg"))
@ -36,12 +36,12 @@ public:
return true; return true;
} }
void onUpdate(float, float x, float y) void onUpdate(float, float x, float y) override
{ {
m_shader.setUniform("pixel_threshold", (x + y) / 30); m_shader.setUniform("pixel_threshold", (x + y) / 30);
} }
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override
{ {
states.shader = &m_shader; states.shader = &m_shader;
target.draw(m_sprite, states); target.draw(m_sprite, states);
@ -67,7 +67,7 @@ public:
{ {
} }
bool onLoad() bool onLoad() override
{ {
// Create the text // Create the text
m_text.setString("Praesent suscipit augue in velit pulvinar hendrerit varius purus aliquam.\n" m_text.setString("Praesent suscipit augue in velit pulvinar hendrerit varius purus aliquam.\n"
@ -99,14 +99,14 @@ public:
return true; return true;
} }
void onUpdate(float time, float x, float y) void onUpdate(float time, float x, float y) override
{ {
m_shader.setUniform("wave_phase", time); m_shader.setUniform("wave_phase", time);
m_shader.setUniform("wave_amplitude", sf::Vector2f(x * 40, y * 40)); m_shader.setUniform("wave_amplitude", sf::Vector2f(x * 40, y * 40));
m_shader.setUniform("blur_radius", (x + y) * 0.008f); m_shader.setUniform("blur_radius", (x + y) * 0.008f);
} }
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override
{ {
states.shader = &m_shader; states.shader = &m_shader;
target.draw(m_text, states); target.draw(m_text, states);
@ -131,7 +131,7 @@ public:
{ {
} }
bool onLoad() bool onLoad() override
{ {
// Create the points // Create the points
m_points.setPrimitiveType(sf::Points); m_points.setPrimitiveType(sf::Points);
@ -152,7 +152,7 @@ public:
return true; return true;
} }
void onUpdate(float time, float x, float y) void onUpdate(float time, float x, float y) override
{ {
float radius = 200 + std::cos(time) * 150; float radius = 200 + std::cos(time) * 150;
m_shader.setUniform("storm_position", sf::Vector2f(x * 800, y * 600)); m_shader.setUniform("storm_position", sf::Vector2f(x * 800, y * 600));
@ -161,7 +161,7 @@ public:
m_shader.setUniform("blink_alpha", 0.5f + std::cos(time * 3) * 0.25f); m_shader.setUniform("blink_alpha", 0.5f + std::cos(time * 3) * 0.25f);
} }
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override
{ {
states.shader = &m_shader; states.shader = &m_shader;
target.draw(m_points, states); target.draw(m_points, states);
@ -186,7 +186,7 @@ public:
{ {
} }
bool onLoad() bool onLoad() override
{ {
// Create the off-screen surface // Create the off-screen surface
if (!m_surface.create(800, 600)) if (!m_surface.create(800, 600))
@ -220,7 +220,7 @@ public:
return true; return true;
} }
void onUpdate(float time, float x, float y) void onUpdate(float time, float x, float y) override
{ {
m_shader.setUniform("edge_threshold", 1 - (x + y) / 2); m_shader.setUniform("edge_threshold", 1 - (x + y) / 2);
@ -241,7 +241,7 @@ public:
m_surface.display(); m_surface.display();
} }
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override
{ {
states.shader = &m_shader; states.shader = &m_shader;
target.draw(sf::Sprite(m_surface.getTexture()), states); target.draw(sf::Sprite(m_surface.getTexture()), states);
@ -271,7 +271,7 @@ public:
{ {
} }
bool onLoad() bool onLoad() override
{ {
// Check if geometry shaders are supported // Check if geometry shaders are supported
if (!sf::Shader::isGeometryAvailable()) if (!sf::Shader::isGeometryAvailable())
@ -301,7 +301,7 @@ public:
return true; return true;
} }
void onUpdate(float /*time*/, float x, float y) void onUpdate(float /*time*/, float x, float y) override
{ {
// Reset our transformation matrix // Reset our transformation matrix
m_transform = sf::Transform::Identity; m_transform = sf::Transform::Identity;
@ -317,7 +317,7 @@ public:
m_shader.setUniform("size", sf::Vector2f(size, size)); m_shader.setUniform("size", sf::Vector2f(size, size));
} }
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override
{ {
// Prepare the render state // Prepare the render state
states.shader = &m_shader; states.shader = &m_shader;

View File

@ -38,7 +38,7 @@ public:
/// \see SoundRecorder::~SoundRecorder() /// \see SoundRecorder::~SoundRecorder()
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~NetworkRecorder() ~NetworkRecorder() override
{ {
// Make sure to stop the recording thread // Make sure to stop the recording thread
stop(); stop();
@ -50,7 +50,7 @@ private:
/// \see SoundRecorder::onStart /// \see SoundRecorder::onStart
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool onStart() bool onStart() override
{ {
if (m_socket.connect(m_host, m_port) == sf::Socket::Done) if (m_socket.connect(m_host, m_port) == sf::Socket::Done)
{ {
@ -67,7 +67,7 @@ private:
/// \see SoundRecorder::onProcessSamples /// \see SoundRecorder::onProcessSamples
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool onProcessSamples(const sf::Int16* samples, std::size_t sampleCount) bool onProcessSamples(const sf::Int16* samples, std::size_t sampleCount) override
{ {
// Pack the audio samples into a network packet // Pack the audio samples into a network packet
sf::Packet packet; sf::Packet packet;
@ -82,7 +82,7 @@ private:
/// \see SoundRecorder::onStop /// \see SoundRecorder::onStop
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void onStop() void onStop() override
{ {
// Send a "end-of-stream" packet // Send a "end-of-stream" packet
sf::Packet packet; sf::Packet packet;

View File

@ -71,7 +71,7 @@ private:
/// /see SoundStream::OnGetData /// /see SoundStream::OnGetData
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool onGetData(sf::SoundStream::Chunk& data) bool onGetData(sf::SoundStream::Chunk& data) override
{ {
// We have reached the end of the buffer and all audio data have been played: we can stop playback // We have reached the end of the buffer and all audio data have been played: we can stop playback
if ((m_offset >= m_samples.size()) && m_hasFinished) if ((m_offset >= m_samples.size()) && m_hasFinished)
@ -102,7 +102,7 @@ private:
/// /see SoundStream::OnSeek /// /see SoundStream::OnSeek
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void onSeek(sf::Time timeOffset) void onSeek(sf::Time timeOffset) override
{ {
m_offset = static_cast<std::size_t>(timeOffset.asMilliseconds()) * getSampleRate() * getChannelCount() / 1000; m_offset = static_cast<std::size_t>(timeOffset.asMilliseconds()) * getSampleRate() * getChannelCount() / 1000;
} }

View File

@ -96,7 +96,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~Music(); ~Music() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a music from an audio file /// \brief Open a music from an audio file
@ -223,7 +223,7 @@ protected:
/// \return True to continue playback, false to stop /// \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 /// \brief Change the current playing position in the stream source
@ -231,7 +231,7 @@ protected:
/// \param timeOffset New playing position, from the beginning of the music /// \param timeOffset New playing position, from the beginning of the music
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void onSeek(Time timeOffset); void onSeek(Time timeOffset) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the current playing position in the stream source to the loop offset /// \brief Change the current playing position in the stream source to the loop offset
@ -243,7 +243,7 @@ protected:
/// \return The seek position after looping (or -1 if there's no loop) /// \return The seek position after looping (or -1 if there's no loop)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Int64 onLoop(); Int64 onLoop() override;
private: private:

View File

@ -72,7 +72,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~Sound(); ~Sound() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Start or resume playing the sound /// \brief Start or resume playing the sound
@ -86,7 +86,7 @@ public:
/// \see pause, stop /// \see pause, stop
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void play(); void play() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Pause the sound /// \brief Pause the sound
@ -97,7 +97,7 @@ public:
/// \see play, stop /// \see play, stop
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void pause(); void pause() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief stop playing the sound /// \brief stop playing the sound
@ -109,7 +109,7 @@ public:
/// \see play, pause /// \see play, pause
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void stop(); void stop() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the source buffer containing the audio data to play /// \brief Set the source buffer containing the audio data to play
@ -189,7 +189,7 @@ public:
/// \return Current status of the sound /// \return Current status of the sound
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Status getStatus() const; Status getStatus() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of assignment operator /// \brief Overload of assignment operator

View File

@ -49,7 +49,7 @@ public:
/// \brief destructor /// \brief destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~SoundBufferRecorder(); ~SoundBufferRecorder() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the sound buffer containing the captured audio data /// \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 /// \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 /// \brief Process a new chunk of recorded samples
@ -83,13 +83,13 @@ protected:
/// \return True to continue the capture, or false to stop it /// \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 /// \brief Stop capturing audio data
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void onStop(); void onStop() override;
private: private:

View File

@ -43,7 +43,6 @@ class InputStream;
class SFML_AUDIO_API SoundFileReader class SFML_AUDIO_API SoundFileReader
{ {
public: public:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Structure holding the audio properties of a sound file /// \brief Structure holding the audio properties of a sound file
/// ///
@ -136,19 +135,20 @@ public:
/// // return true if the reader can handle the format /// // return true if the reader can handle the format
/// } /// }
/// ///
/// virtual bool open(sf::InputStream& stream, Info& info) /// bool open(sf::InputStream& stream, Info& info) override
/// { /// {
/// // read the sound file header and fill the sound attributes /// // read the sound file header and fill the sound attributes
/// // (channel count, sample count and sample rate) /// // (channel count, sample count and sample rate)
/// // return true on success /// // return true on success
/// } /// }
/// ///
/// virtual void seek(sf::Uint64 sampleOffset) /// void seek(sf::Uint64 sampleOffset) override
/// { /// {
/// // advance to the sampleOffset-th sample from the beginning of the sound /// // advance to the sampleOffset-th sample from the beginning of the
/// sound
/// } /// }
/// ///
/// virtual sf::Uint64 read(sf::Int16* samples, sf::Uint64 maxCount) /// sf::Uint64 read(sf::Int16* samples, sf::Uint64 maxCount) override
/// { /// {
/// // read up to 'maxCount' samples into the 'samples' array, /// // read up to 'maxCount' samples into the 'samples' array,
/// // convert them (for example from normalized float) if they are not stored /// // convert them (for example from normalized float) if they are not stored

View File

@ -103,14 +103,14 @@ public:
/// // return true if the writer can handle the format /// // return true if the writer can handle the format
/// } /// }
/// ///
/// 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
/// { /// {
/// // open the file 'filename' for writing, /// // open the file 'filename' for writing,
/// // write the given sample rate and channel count to the file header /// // write the given sample rate and channel count to the file header
/// // return true on success /// // return true on success
/// } /// }
/// ///
/// virtual void write(const sf::Int16* samples, sf::Uint64 count) /// void write(const sf::Int16* samples, sf::Uint64 count) override
/// { /// {
/// // write 'count' samples stored at address 'samples', /// // write 'count' samples stored at address 'samples',
/// // convert them (for example to normalized float) if the format requires it /// // convert them (for example to normalized float) if the format requires it

View File

@ -365,7 +365,7 @@ private:
/// stop(); /// stop();
/// } /// }
/// ///
/// virtual bool onStart() // optional /// bool onStart() override // optional
/// { /// {
/// // Initialize whatever has to be done before the capture starts /// // Initialize whatever has to be done before the capture starts
/// ... /// ...
@ -374,7 +374,7 @@ private:
/// return true; /// return true;
/// } /// }
/// ///
/// virtual bool onProcessSamples(const Int16* samples, std::size_t sampleCount) /// bool onProcessSamples(const Int16* samples, std::size_t sampleCount) override
/// { /// {
/// // Do something with the new chunk of samples (store them, send them, ...) /// // Do something with the new chunk of samples (store them, send them, ...)
/// ... /// ...
@ -383,7 +383,7 @@ private:
/// return true; /// return true;
/// } /// }
/// ///
/// virtual void onStop() // optional /// void onStop() override // optional
/// { /// {
/// // Clean up whatever has to be done after the capture ends /// // Clean up whatever has to be done after the capture ends
/// ... /// ...

View File

@ -60,7 +60,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~SoundStream(); ~SoundStream() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Start or resume playing the audio stream /// \brief Start or resume playing the audio stream
@ -74,7 +74,7 @@ public:
/// \see pause, stop /// \see pause, stop
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void play(); void play() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Pause the audio stream /// \brief Pause the audio stream
@ -85,7 +85,7 @@ public:
/// \see play, stop /// \see play, stop
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void pause(); void pause() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Stop playing the audio stream /// \brief Stop playing the audio stream
@ -97,7 +97,7 @@ public:
/// \see play, pause /// \see play, pause
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void stop(); void stop() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Return the number of channels of the stream /// \brief Return the number of channels of the stream
@ -126,7 +126,7 @@ public:
/// \return Current status /// \return Current status
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
Status getStatus() const; Status getStatus() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the current playing position of the stream /// \brief Change the current playing position of the stream
@ -391,7 +391,7 @@ private:
/// ///
/// private: /// private:
/// ///
/// virtual bool onGetData(Chunk& data) /// bool onGetData(Chunk& data) override
/// { /// {
/// // Fill the chunk with audio data from the stream source /// // Fill the chunk with audio data from the stream source
/// // (note: must not be empty if you want to continue playing) /// // (note: must not be empty if you want to continue playing)
@ -402,7 +402,7 @@ private:
/// return true; /// return true;
/// } /// }
/// ///
/// virtual void onSeek(sf::Time timeOffset) /// void onSeek(sf::Time timeOffset) override
/// { /// {
/// // Change the current position in the stream source /// // Change the current position in the stream source
/// ... /// ...

View File

@ -89,7 +89,7 @@ public:
/// \see setPointCount /// \see setPointCount
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual std::size_t getPointCount() const; std::size_t getPointCount() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get a point of the circle /// \brief Get a point of the circle
@ -104,7 +104,7 @@ public:
/// \return index-th point of the shape /// \return index-th point of the shape
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2f getPoint(std::size_t index) const; Vector2f getPoint(std::size_t index) const override;
private: private:

View File

@ -71,7 +71,7 @@ public:
/// \see setPointCount /// \see setPointCount
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual std::size_t getPointCount() const; std::size_t getPointCount() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the position of a point /// \brief Set the position of a point
@ -105,7 +105,7 @@ public:
/// \see setPoint /// \see setPoint
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2f getPoint(std::size_t index) const; Vector2f getPoint(std::size_t index) const override;
private: private:

View File

@ -100,7 +100,7 @@ protected:
/// ///
/// private: /// private:
/// ///
/// virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const /// void draw(sf::RenderTarget& target, sf::RenderStates states) const override
/// { /// {
/// // You can draw other high-level objects /// // You can draw other high-level objects
/// target.draw(m_sprite, states); /// target.draw(m_sprite, states);

View File

@ -77,7 +77,7 @@ public:
/// shapes, this number is always 4. /// 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 /// \brief Get a point of the rectangle
@ -92,7 +92,7 @@ public:
/// \return index-th point of the shape /// \return index-th point of the shape
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2f getPoint(std::size_t index) const; Vector2f getPoint(std::size_t index) const override;
private: private:

View File

@ -64,7 +64,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~RenderTexture(); ~RenderTexture() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create the render-texture /// \brief Create the render-texture
@ -193,7 +193,7 @@ public:
/// \return True if operation was successful, false otherwise /// \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 /// \brief Update the contents of the target texture
@ -215,7 +215,7 @@ public:
/// \return Size in pixels /// \return Size in pixels
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2u getSize() const; Vector2u getSize() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -227,7 +227,7 @@ public:
/// \return True if the render-texture use sRGB encoding, false otherwise /// \return True if the render-texture use sRGB encoding, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool isSrgb() const; bool isSrgb() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get a read-only reference to the target texture /// \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. /// 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 /// \brief Get the size of the rendering region of the window
@ -110,7 +110,7 @@ public:
/// \return Size in pixels /// \return Size in pixels
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2u getSize() const; Vector2u getSize() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -121,7 +121,7 @@ public:
/// \return True if the window use sRGB encoding, false otherwise /// \return True if the window use sRGB encoding, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool isSrgb() const; bool isSrgb() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Activate or deactivate the window as the current target /// \brief Activate or deactivate the window as the current target
@ -139,7 +139,7 @@ public:
/// \return True if operation was successful, false otherwise /// \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 /// \brief Copy the current contents of the window to an image
@ -178,7 +178,7 @@ protected:
/// the window is created. /// the window is created.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void onCreate(); void onCreate() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Function called after the window has been resized /// \brief Function called after the window has been resized
@ -187,7 +187,7 @@ protected:
/// perform custom actions when the size of the window changes. /// perform custom actions when the size of the window changes.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void onResize(); void onResize() override;
private: private:

View File

@ -49,7 +49,7 @@ public:
/// \brief Virtual destructor /// \brief Virtual destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~Shape(); ~Shape() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the source texture of the shape /// \brief Change the source texture of the shape
@ -274,7 +274,7 @@ private:
/// \param states Current render states /// \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 /// \brief Update the fill vertices' color

View File

@ -198,7 +198,7 @@ private:
/// \param states Current render states /// \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 /// \brief Update the vertices' positions

View File

@ -421,7 +421,7 @@ private:
/// \param states Current render states /// \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 /// \brief Make sure the text's geometry is updated

View File

@ -377,7 +377,7 @@ private:
/// \code /// \code
/// class MyEntity : public sf::Transformable, public sf::Drawable /// class MyEntity : public sf::Transformable, public sf::Drawable
/// { /// {
/// virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const /// void draw(sf::RenderTarget& target, sf::RenderStates states) const override
/// { /// {
/// states.transform *= getTransform(); /// states.transform *= getTransform();
/// target.draw(..., states); /// target.draw(..., states);

View File

@ -180,7 +180,7 @@ private:
/// \param states Current render states /// \param states Current render states
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void draw(RenderTarget& target, RenderStates states) const; void draw(RenderTarget& target, RenderStates states) const override;
private: private:

View File

@ -116,7 +116,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~VertexBuffer(); ~VertexBuffer() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create the vertex buffer /// \brief Create the vertex buffer
@ -327,7 +327,7 @@ private:
/// \param states Current render states /// \param states Current render states
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void draw(RenderTarget& target, RenderStates states) const; void draw(RenderTarget& target, RenderStates states) const override;
private: private:

View File

@ -514,7 +514,7 @@ private:
/// \code /// \code
/// class ZipPacket : public sf::Packet /// class ZipPacket : public sf::Packet
/// { /// {
/// virtual const void* onSend(std::size_t& size) /// const void* onSend(std::size_t& size) override
/// { /// {
/// const void* srcData = getData(); /// const void* srcData = getData();
/// std::size_t srcSize = getDataSize(); /// std::size_t srcSize = getDataSize();
@ -522,7 +522,7 @@ private:
/// return MySuperZipFunction(srcData, srcSize, &size); /// return MySuperZipFunction(srcData, srcSize, &size);
/// } /// }
/// ///
/// virtual void onReceive(const void* data, std::size_t size) /// void onReceive(const void* data, std::size_t size) override
/// { /// {
/// std::size_t dstSize; /// std::size_t dstSize;
/// const void* dstData = MySuperUnzipFunction(data, size, &dstSize); /// const void* dstData = MySuperUnzipFunction(data, size, &dstSize);

View File

@ -65,7 +65,7 @@ public:
/// \brief Default destructor /// \brief Default destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~FileInputStream(); ~FileInputStream() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open the stream from a file path /// \brief Open the stream from a file path
@ -89,7 +89,7 @@ public:
/// \return The number of bytes actually read, or -1 on error /// \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 /// \brief Change the current reading position
@ -99,7 +99,7 @@ public:
/// \return The position actually sought to, or -1 on error /// \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 /// \brief Get the current reading position in the stream
@ -107,7 +107,7 @@ public:
/// \return The current position, or -1 on error. /// \return The current position, or -1 on error.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Int64 tell(); Int64 tell() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Return the size of the stream /// \brief Return the size of the stream
@ -115,7 +115,7 @@ public:
/// \return The total number of bytes available in the stream, or -1 on error /// \return The total number of bytes available in the stream, or -1 on error
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Int64 getSize(); Int64 getSize() override;
private: private:

View File

@ -71,7 +71,7 @@ public:
/// \return The number of bytes actually read, or -1 on error /// \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 /// \brief Change the current reading position
@ -81,7 +81,7 @@ public:
/// \return The position actually sought to, or -1 on error /// \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 /// \brief Get the current reading position in the stream
@ -89,7 +89,7 @@ public:
/// \return The current position, or -1 on error. /// \return The current position, or -1 on error.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Int64 tell(); Int64 tell() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Return the size of the stream /// \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 /// \return The total number of bytes available in the stream, or -1 on error
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Int64 getSize(); Int64 getSize() override;
private: private:

View File

@ -36,7 +36,7 @@ template <typename T>
struct ThreadFunctor : ThreadFunc struct ThreadFunctor : ThreadFunc
{ {
ThreadFunctor(T functor) : m_functor(functor) {} ThreadFunctor(T functor) : m_functor(functor) {}
virtual void run() {m_functor();} void run() override {m_functor();}
T m_functor; T m_functor;
}; };
@ -45,7 +45,7 @@ template <typename F, typename A>
struct ThreadFunctorWithArg : ThreadFunc struct ThreadFunctorWithArg : ThreadFunc
{ {
ThreadFunctorWithArg(F function, A arg) : m_function(function), m_arg(arg) {} ThreadFunctorWithArg(F function, A arg) : m_function(function), m_arg(arg) {}
virtual void run() {m_function(m_arg);} void run() override {m_function(m_arg);}
F m_function; F m_function;
A m_arg; A m_arg;
}; };
@ -55,7 +55,7 @@ template <typename C>
struct ThreadMemberFunc : ThreadFunc struct ThreadMemberFunc : ThreadFunc
{ {
ThreadMemberFunc(void(C::*function)(), C* object) : m_function(function), m_object(object) {} ThreadMemberFunc(void(C::*function)(), C* object) : m_function(function), m_object(object) {}
virtual void run() {(m_object->*m_function)();} void run() override {(m_object->*m_function)();}
void(C::*m_function)(); void(C::*m_function)();
C* m_object; C* m_object;
}; };

View File

@ -102,7 +102,7 @@ public:
/// Closes the window and frees all the resources attached to it. /// Closes the window and frees all the resources attached to it.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual ~Window(); ~Window() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create (or recreate) the window /// \brief Create (or recreate) the window
@ -116,7 +116,7 @@ public:
/// \param style %Window style, a bitwise OR combination of sf::Style enumerators /// \param style %Window style, a bitwise OR combination of sf::Style enumerators
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void create(VideoMode mode, const String& title, Uint32 style = Style::Default); void create(VideoMode mode, const String& title, Uint32 style = Style::Default) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create (or recreate) the window /// \brief Create (or recreate) the window
@ -147,7 +147,7 @@ public:
/// \param handle Platform-specific handle of the control /// \param handle Platform-specific handle of the control
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void create(WindowHandle handle); void create(WindowHandle handle) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create (or recreate) the window from an existing control /// \brief Create (or recreate) the window from an existing control
@ -176,7 +176,7 @@ public:
/// and will have no effect on closed windows. /// and will have no effect on closed windows.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void close(); void close() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the settings of the OpenGL context of the window /// \brief Get the settings of the OpenGL context of the window

View File

@ -68,7 +68,7 @@ public:
/// \brief Default constructor /// \brief Default constructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~SoundFileReaderFlac(); ~SoundFileReaderFlac() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a sound file for reading /// \brief Open a sound file for reading
@ -77,7 +77,7 @@ public:
/// \param info Structure to fill with the attributes of the loaded sound /// \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 /// \brief Change the current read position to the given sample offset
@ -92,7 +92,7 @@ public:
/// \param sampleOffset Index of the sample to jump to, relative to the beginning /// \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 /// \brief Read audio samples from the open file
@ -103,7 +103,7 @@ public:
/// \return Number of samples actually read (may be less than \a maxCount) /// \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: public:

View File

@ -66,7 +66,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~SoundFileReaderOgg(); ~SoundFileReaderOgg() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a sound file for reading /// \brief Open a sound file for reading
@ -77,7 +77,7 @@ public:
/// \return True if the file was successfully opened /// \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 /// \brief Change the current read position to the given sample offset
@ -92,7 +92,7 @@ public:
/// \param sampleOffset Index of the sample to jump to, relative to the beginning /// \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 /// \brief Read audio samples from the open file
@ -103,7 +103,7 @@ public:
/// \return Number of samples actually read (may be less than \a maxCount) /// \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: private:

View File

@ -69,7 +69,7 @@ public:
/// \param info Structure to fill with the attributes of the loaded sound /// \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 /// \brief Change the current read position to the given sample offset
@ -84,7 +84,7 @@ public:
/// \param sampleOffset Index of the sample to jump to, relative to the beginning /// \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 /// \brief Read audio samples from the open file
@ -95,7 +95,7 @@ public:
/// \return Number of samples actually read (may be less than \a maxCount) /// \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: private:

View File

@ -67,7 +67,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~SoundFileWriterFlac(); ~SoundFileWriterFlac() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a sound file for writing /// \brief Open a sound file for writing
@ -79,7 +79,7 @@ public:
/// \return True if the file was successfully opened /// \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 /// \brief Write audio samples to the open file
@ -88,7 +88,7 @@ public:
/// \param count Number of samples to write /// \param count Number of samples to write
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void write(const Int16* samples, Uint64 count); void write(const Int16* samples, Uint64 count) override;
private: private:

View File

@ -67,7 +67,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~SoundFileWriterOgg(); ~SoundFileWriterOgg() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a sound file for writing /// \brief Open a sound file for writing
@ -79,7 +79,7 @@ public:
/// \return True if the file was successfully opened /// \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 /// \brief Write audio samples to the open file
@ -88,7 +88,7 @@ public:
/// \param count Number of samples to write /// \param count Number of samples to write
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void write(const Int16* samples, Uint64 count); void write(const Int16* samples, Uint64 count) override;
private: private:

View File

@ -67,7 +67,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~SoundFileWriterWav(); ~SoundFileWriterWav() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Open a sound file for writing /// \brief Open a sound file for writing
@ -79,7 +79,7 @@ public:
/// \return True if the file was successfully opened /// \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 /// \brief Write audio samples to the open file
@ -88,7 +88,7 @@ public:
/// \param count Number of samples to write /// \param count Number of samples to write
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void write(const Int16* samples, Uint64 count); void write(const Int16* samples, Uint64 count) override;
private: private:

View File

@ -56,7 +56,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~RenderTextureImplDefault(); ~RenderTextureImplDefault() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the maximum anti-aliasing level supported by the system /// \brief Get the maximum anti-aliasing level supported by the system
@ -79,7 +79,7 @@ private:
/// \return True if creation has been successful /// \return True if creation has been successful
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool create(unsigned int width, unsigned int height, unsigned int textureId, const ContextSettings& settings); bool create(unsigned int width, unsigned int height, unsigned int textureId, const ContextSettings& settings) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Activate or deactivate the render texture for rendering /// \brief Activate or deactivate the render texture for rendering
@ -89,7 +89,7 @@ private:
/// \return True on success, false on failure /// \return True on success, false on failure
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool activate(bool active); bool activate(bool active) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Tell if the render-texture will use sRGB encoding when drawing on it /// \brief Tell if the render-texture will use sRGB encoding when drawing on it
@ -100,7 +100,7 @@ private:
/// \return True if the render-texture use sRGB encoding, false otherwise /// \return True if the render-texture use sRGB encoding, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool isSrgb() const; bool isSrgb() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Update the pixels of the target texture /// \brief Update the pixels of the target texture
@ -108,7 +108,7 @@ private:
/// \param textureId OpenGL identifier of the target texture /// \param textureId OpenGL identifier of the target texture
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void updateTexture(unsigned textureId); void updateTexture(unsigned textureId) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member data // Member data

View File

@ -57,7 +57,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~RenderTextureImplFBO(); ~RenderTextureImplFBO() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check whether the system supports FBOs or not /// \brief Check whether the system supports FBOs or not
@ -94,7 +94,7 @@ private:
/// \return True if creation has been successful /// \return True if creation has been successful
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool create(unsigned int width, unsigned int height, unsigned int textureId, const ContextSettings& settings); bool create(unsigned int width, unsigned int height, unsigned int textureId, const ContextSettings& settings) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create an FBO in the current context /// \brief Create an FBO in the current context
@ -112,7 +112,7 @@ private:
/// \return True on success, false on failure /// \return True on success, false on failure
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool activate(bool active); bool activate(bool active) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Tell if the render-texture will use sRGB encoding when drawing on it /// \brief Tell if the render-texture will use sRGB encoding when drawing on it
@ -123,7 +123,7 @@ private:
/// \return True if the render-texture use sRGB encoding, false otherwise /// \return True if the render-texture use sRGB encoding, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool isSrgb() const; bool isSrgb() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Update the pixels of the target texture /// \brief Update the pixels of the target texture
@ -131,7 +131,7 @@ private:
/// \param textureId OpenGL identifier of the target texture /// \param textureId OpenGL identifier of the target texture
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void updateTexture(unsigned textureId); void updateTexture(unsigned textureId) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member data // Member data

View File

@ -46,7 +46,7 @@ public:
setp(buffer, buffer + size); setp(buffer, buffer + size);
} }
~DefaultErrStreamBuf() ~DefaultErrStreamBuf() override
{ {
// Synchronize // Synchronize
sync(); sync();
@ -57,7 +57,7 @@ public:
private: private:
virtual int overflow(int character) int overflow(int character) override
{ {
if ((character != EOF) && (pptr() != epptr())) if ((character != EOF) && (pptr() != epptr()))
{ {
@ -77,7 +77,7 @@ private:
} }
} }
virtual int sync() int sync() override
{ {
// Check if there is something into the write buffer // Check if there is something into the write buffer
if (pbase() != pptr()) if (pbase() != pptr())

View File

@ -78,7 +78,7 @@ public:
/// \return Handle of the window /// \return Handle of the window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const; WindowHandle getSystemHandle() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the position of the window /// \brief Get the position of the window
@ -86,7 +86,7 @@ public:
/// \return Position of the window, in pixels /// \return Position of the window, in pixels
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const; Vector2i getPosition() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen /// \brief Change the position of the window on screen
@ -94,7 +94,7 @@ public:
/// \param position New position of the window, in pixels /// \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 /// \brief Get the client size of the window
@ -102,7 +102,7 @@ public:
/// \return Size of the window, in pixels /// \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 /// \brief Change the size of the rendering region of the window
@ -110,7 +110,7 @@ public:
/// \param size New size, in pixels /// \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 /// \brief Change the title of the window
@ -118,7 +118,7 @@ public:
/// \param title New title /// \param title New title
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setTitle(const String& title); void setTitle(const String& title) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the window's icon /// \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 /// \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 /// \brief Show or hide the window
@ -136,7 +136,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Show or hide the mouse cursor
@ -144,7 +144,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Clips or releases the mouse cursor
@ -152,7 +152,7 @@ public:
/// \param grabbed True to enable, false to disable /// \param grabbed True to enable, false to disable
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed); void setMouseCursorGrabbed(bool grabbed) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor /// \brief Set the displayed cursor to a native system cursor
@ -160,7 +160,7 @@ public:
/// \param cursor Native system cursor type to display /// \param cursor Native system cursor type to display
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursor(const CursorImpl& cursor); void setMouseCursor(const CursorImpl& cursor) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable automatic key-repeat /// \brief Enable or disable automatic key-repeat
@ -168,14 +168,14 @@ public:
/// \param enabled True to enable, false to disable /// \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 /// \brief Request the current window to be made the active
/// foreground window /// foreground window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void requestFocus(); void requestFocus() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus /// \brief Check whether the window has the input focus
@ -183,7 +183,7 @@ public:
/// \return True if window has focus, false otherwise /// \return True if window has focus, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool hasFocus() const; bool hasFocus() const override;
static void forwardEvent(const Event& event); static void forwardEvent(const Event& event);
static WindowImplAndroid* singleInstance; static WindowImplAndroid* singleInstance;
@ -194,7 +194,7 @@ protected:
/// \brief Process incoming events from the operating system /// \brief Process incoming events from the operating system
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void processEvents(); void processEvents() override;
private: private:

View File

@ -81,7 +81,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~EglContext(); ~EglContext() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the address of an OpenGL function /// \brief Get the address of an OpenGL function
@ -102,13 +102,13 @@ public:
/// \return True on success, false if any error happened /// \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 /// \brief Display what has been rendered to the context so far
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void display(); void display() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable vertical synchronization /// \brief Enable or disable vertical synchronization
@ -121,7 +121,7 @@ public:
/// \param enabled: True to enable v-sync, false to deactivate /// \param enabled: True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setVerticalSyncEnabled(bool enabled); void setVerticalSyncEnabled(bool enabled) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Create the context /// \brief Create the context

View File

@ -117,7 +117,7 @@ public:
/// \brief Display what has been rendered to the context so far /// \brief Display what has been rendered to the context so far
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void display(); void display() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable vertical synchronization /// \brief Enable or disable vertical synchronization
@ -130,7 +130,7 @@ public:
/// \param enabled True to enable v-sync, false to deactivate /// \param enabled True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setVerticalSyncEnabled(bool enabled); void setVerticalSyncEnabled(bool enabled) override;
protected: protected:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -142,7 +142,7 @@ protected:
/// \return True on success, false if any error happened /// \return True on success, false if any error happened
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool makeCurrent(bool current); bool makeCurrent(bool current) override;
private: private:
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////

View File

@ -245,7 +245,7 @@ public:
/// \return Handle of the window /// \return Handle of the window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const; WindowHandle getSystemHandle() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the position of the window /// \brief Get the position of the window
@ -253,7 +253,7 @@ public:
/// \return Position of the window, in pixels /// \return Position of the window, in pixels
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const; Vector2i getPosition() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen /// \brief Change the position of the window on screen
@ -261,7 +261,7 @@ public:
/// \param position New position of the window, in pixels /// \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 /// \brief Get the client size of the window
@ -269,7 +269,7 @@ public:
/// \return Size of the window, in pixels /// \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 /// \brief Change the size of the rendering region of the window
@ -277,7 +277,7 @@ public:
/// \param size New size, in pixels /// \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 /// \brief Change the title of the window
@ -285,7 +285,7 @@ public:
/// \param title New title /// \param title New title
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setTitle(const String& title); void setTitle(const String& title) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the window's icon /// \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 /// \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 /// \brief Show or hide the window
@ -303,7 +303,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Show or hide the mouse cursor
@ -311,7 +311,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Grab or release the mouse cursor
@ -319,7 +319,7 @@ public:
/// \param grabbed True to grab, false to release /// \param grabbed True to grab, false to release
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed); void setMouseCursorGrabbed(bool grabbed) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor /// \brief Set the displayed cursor to a native system cursor
@ -327,7 +327,7 @@ public:
/// \param cursor Native system cursor type to display /// \param cursor Native system cursor type to display
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursor(const CursorImpl& cursor); void setMouseCursor(const CursorImpl& cursor) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable automatic key-repeat /// \brief Enable or disable automatic key-repeat
@ -335,14 +335,14 @@ public:
/// \param enabled True to enable, false to disable /// \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 /// \brief Request the current window to be made the active
/// foreground window /// foreground window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void requestFocus(); void requestFocus() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus /// \brief Check whether the window has the input focus
@ -350,7 +350,7 @@ public:
/// \return True if window has focus, false otherwise /// \return True if window has focus, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool hasFocus() const; bool hasFocus() const override;
protected: protected:
@ -358,7 +358,7 @@ protected:
/// \brief Process incoming events from the operating system /// \brief Process incoming events from the operating system
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void processEvents(); void processEvents() override;
private: private:

View File

@ -99,13 +99,13 @@ public:
/// \return True on success, false if any error happened /// \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 /// \brief Display what has been rendered to the context so far
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void display(); void display() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable vertical synchronization /// \brief Enable or disable vertical synchronization
@ -118,7 +118,7 @@ public:
/// \param enabled True to enable v-sync, false to deactivate /// \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 /// \brief Select the best GLX visual for a given set of settings

View File

@ -80,7 +80,7 @@ public:
/// \return Handle of the window /// \return Handle of the window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const; WindowHandle getSystemHandle() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the position of the window /// \brief Get the position of the window
@ -88,7 +88,7 @@ public:
/// \return Position of the window, in pixels /// \return Position of the window, in pixels
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const; Vector2i getPosition() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen /// \brief Change the position of the window on screen
@ -96,7 +96,7 @@ public:
/// \param position New position of the window, in pixels /// \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 /// \brief Get the client size of the window
@ -104,7 +104,7 @@ public:
/// \return Size of the window, in pixels /// \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 /// \brief Change the size of the rendering region of the window
@ -112,7 +112,7 @@ public:
/// \param size New size, in pixels /// \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 /// \brief Change the title of the window
@ -120,7 +120,7 @@ public:
/// \param title New title /// \param title New title
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setTitle(const String& title); void setTitle(const String& title) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the window's icon /// \brief Change the window's icon
@ -130,7 +130,7 @@ public:
/// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits /// \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 /// \brief Show or hide the window
@ -138,7 +138,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Show or hide the mouse cursor
@ -146,7 +146,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Grab or release the mouse cursor
@ -154,7 +154,7 @@ public:
/// \param grabbed True to enable, false to disable /// \param grabbed True to enable, false to disable
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed); void setMouseCursorGrabbed(bool grabbed) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor /// \brief Set the displayed cursor to a native system cursor
@ -162,7 +162,7 @@ public:
/// \param cursor Native system cursor type to display /// \param cursor Native system cursor type to display
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursor(const CursorImpl& cursor); void setMouseCursor(const CursorImpl& cursor) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable automatic key-repeat /// \brief Enable or disable automatic key-repeat
@ -170,14 +170,14 @@ public:
/// \param enabled True to enable, false to disable /// \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 /// \brief Request the current window to be made the active
/// foreground window /// foreground window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void requestFocus(); void requestFocus() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus /// \brief Check whether the window has the input focus
@ -185,7 +185,7 @@ public:
/// \return True if window has focus, false otherwise /// \return True if window has focus, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool hasFocus() const; bool hasFocus() const override;
protected: protected:
@ -193,7 +193,7 @@ protected:
/// \brief Process incoming events from the operating system /// \brief Process incoming events from the operating system
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void processEvents(); void processEvents() override;
private: private:
@ -266,7 +266,7 @@ private:
bool processEvent(XEvent& windowEvent); bool processEvent(XEvent& windowEvent);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check if a valid version of XRandR extension is present /// \brief Check if a valid version of XRandR extension is present
/// ///
/// \param xRandRMajor XRandR major version /// \param xRandRMajor XRandR major version
/// \param xRandRMinor XRandR minor version /// \param xRandRMinor XRandR minor version

View File

@ -78,7 +78,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~WglContext(); ~WglContext() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the address of an OpenGL function /// \brief Get the address of an OpenGL function
@ -98,13 +98,13 @@ public:
/// \return True on success, false if any error happened /// \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 /// \brief Display what has been rendered to the context so far
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void display(); void display() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable vertical synchronization /// \brief Enable or disable vertical synchronization
@ -117,7 +117,7 @@ public:
/// \param enabled: True to enable v-sync, false to deactivate /// \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 /// \brief Select the best pixel format for a given set of settings

View File

@ -69,7 +69,7 @@ public:
/// \brief Destructor /// \brief Destructor
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
~WindowImplWin32(); ~WindowImplWin32() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the OS-specific handle of the window /// \brief Get the OS-specific handle of the window
@ -77,7 +77,7 @@ public:
/// \return Handle of the window /// \return Handle of the window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const; WindowHandle getSystemHandle() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the position of the window /// \brief Get the position of the window
@ -85,7 +85,7 @@ public:
/// \return Position of the window, in pixels /// \return Position of the window, in pixels
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const; Vector2i getPosition() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen /// \brief Change the position of the window on screen
@ -93,7 +93,7 @@ public:
/// \param position New position of the window, in pixels /// \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 /// \brief Get the client size of the window
@ -101,7 +101,7 @@ public:
/// \return Size of the window, in pixels /// \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 /// \brief Change the size of the rendering region of the window
@ -109,7 +109,7 @@ public:
/// \param size New size, in pixels /// \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 /// \brief Change the title of the window
@ -117,7 +117,7 @@ public:
/// \param title New title /// \param title New title
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setTitle(const String& title); void setTitle(const String& title) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the window's icon /// \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 /// \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 /// \brief Show or hide the window
@ -135,7 +135,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Show or hide the mouse cursor
@ -143,7 +143,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Grab or release the mouse cursor
@ -151,7 +151,7 @@ public:
/// \param grabbed True to enable, false to disable /// \param grabbed True to enable, false to disable
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed); void setMouseCursorGrabbed(bool grabbed) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor /// \brief Set the displayed cursor to a native system cursor
@ -159,7 +159,7 @@ public:
/// \param cursor Native system cursor type to display /// \param cursor Native system cursor type to display
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursor(const CursorImpl& cursor); void setMouseCursor(const CursorImpl& cursor) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable automatic key-repeat /// \brief Enable or disable automatic key-repeat
@ -167,14 +167,14 @@ public:
/// \param enabled True to enable, false to disable /// \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 /// \brief Request the current window to be made the active
/// foreground window /// foreground window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void requestFocus(); void requestFocus() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus /// \brief Check whether the window has the input focus
@ -182,7 +182,7 @@ public:
/// \return True if window has focus, false otherwise /// \return True if window has focus, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool hasFocus() const; bool hasFocus() const override;
protected: protected:
@ -190,7 +190,7 @@ protected:
/// \brief Process incoming events from the operating system /// \brief Process incoming events from the operating system
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void processEvents(); void processEvents() override;
private: private:

View File

@ -115,7 +115,7 @@ public:
/// \brief Display what has been rendered to the context so far /// \brief Display what has been rendered to the context so far
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void display(); void display() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable vertical synchronization /// \brief Enable or disable vertical synchronization
@ -128,7 +128,7 @@ public:
/// \param enabled: True to enable v-sync, false to deactivate /// \param enabled: True to enable v-sync, false to deactivate
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setVerticalSyncEnabled(bool enabled); void setVerticalSyncEnabled(bool enabled) override;
protected: protected:
@ -141,7 +141,7 @@ protected:
/// \return True on success, false if any error happened /// \return True on success, false if any error happened
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool makeCurrent(bool current); bool makeCurrent(bool current) override;
private: private:

View File

@ -81,7 +81,7 @@ public:
/// \return Handle of the window /// \return Handle of the window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const; WindowHandle getSystemHandle() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Get the position of the window /// \brief Get the position of the window
@ -89,7 +89,7 @@ public:
/// \return Position of the window, in pixels /// \return Position of the window, in pixels
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const; Vector2i getPosition() const override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen /// \brief Change the position of the window on screen
@ -97,7 +97,7 @@ public:
/// \param position New position of the window, in pixels /// \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 /// \brief Get the client size of the window
@ -105,7 +105,7 @@ public:
/// \return Size of the window, in pixels /// \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 /// \brief Change the size of the rendering region of the window
@ -113,7 +113,7 @@ public:
/// \param size New size, in pixels /// \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 /// \brief Change the title of the window
@ -121,7 +121,7 @@ public:
/// \param title New title /// \param title New title
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setTitle(const String& title); void setTitle(const String& title) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Change the window's icon /// \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 /// \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 /// \brief Show or hide the window
@ -139,7 +139,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Show or hide the mouse cursor
@ -147,7 +147,7 @@ public:
/// \param visible True to show, false to hide /// \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 /// \brief Clips or releases the mouse cursor
@ -155,7 +155,7 @@ public:
/// \param grabbed True to enable, false to disable /// \param grabbed True to enable, false to disable
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed); void setMouseCursorGrabbed(bool grabbed) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor /// \brief Set the displayed cursor to a native system cursor
@ -163,7 +163,7 @@ public:
/// \param cursor Native system cursor type to display /// \param cursor Native system cursor type to display
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void setMouseCursor(const CursorImpl& cursor); void setMouseCursor(const CursorImpl& cursor) override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Enable or disable automatic key-repeat /// \brief Enable or disable automatic key-repeat
@ -171,14 +171,14 @@ public:
/// \param enabled True to enable, false to disable /// \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 /// \brief Request the current window to be made the active
/// foreground window /// foreground window
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void requestFocus(); void requestFocus() override;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus /// \brief Check whether the window has the input focus
@ -186,7 +186,7 @@ public:
/// \return True if window has focus, false otherwise /// \return True if window has focus, false otherwise
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual bool hasFocus() const; bool hasFocus() const override;
public: public:
@ -220,7 +220,7 @@ protected:
/// \brief Process incoming events from the operating system /// \brief Process incoming events from the operating system
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
virtual void processEvents(); void processEvents() override;
private: private: