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
-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
-Wsuggest-override # warn when 'override' could be used on a member function overriding a virtual function
${NON_ANDROID_CLANG_AND_GCC_WARNINGS}
)

View File

@ -16,7 +16,7 @@ class Effect : public sf::Drawable
{
public:
virtual ~Effect()
~Effect() override
{
}
@ -41,7 +41,7 @@ public:
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)
{

View File

@ -21,7 +21,7 @@ public:
{
}
bool onLoad()
bool onLoad() override
{
// Load the texture and initialize the sprite
if (!m_texture.loadFromFile("resources/background.jpg"))
@ -36,12 +36,12 @@ public:
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);
}
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override
{
states.shader = &m_shader;
target.draw(m_sprite, states);
@ -67,7 +67,7 @@ public:
{
}
bool onLoad()
bool onLoad() override
{
// Create the text
m_text.setString("Praesent suscipit augue in velit pulvinar hendrerit varius purus aliquam.\n"
@ -99,14 +99,14 @@ public:
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_amplitude", sf::Vector2f(x * 40, y * 40));
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;
target.draw(m_text, states);
@ -131,7 +131,7 @@ public:
{
}
bool onLoad()
bool onLoad() override
{
// Create the points
m_points.setPrimitiveType(sf::Points);
@ -152,7 +152,7 @@ public:
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;
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);
}
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const
void onDraw(sf::RenderTarget& target, sf::RenderStates states) const override
{
states.shader = &m_shader;
target.draw(m_points, states);
@ -186,7 +186,7 @@ public:
{
}
bool onLoad()
bool onLoad() override
{
// Create the off-screen surface
if (!m_surface.create(800, 600))
@ -220,7 +220,7 @@ public:
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);
@ -241,7 +241,7 @@ public:
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;
target.draw(sf::Sprite(m_surface.getTexture()), states);
@ -271,7 +271,7 @@ public:
{
}
bool onLoad()
bool onLoad() override
{
// Check if geometry shaders are supported
if (!sf::Shader::isGeometryAvailable())
@ -301,7 +301,7 @@ public:
return true;
}
void onUpdate(float /*time*/, float x, float y)
void onUpdate(float /*time*/, float x, float y) override
{
// Reset our transformation matrix
m_transform = sf::Transform::Identity;
@ -317,7 +317,7 @@ public:
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
states.shader = &m_shader;

View File

@ -38,7 +38,7 @@ public:
/// \see SoundRecorder::~SoundRecorder()
///
////////////////////////////////////////////////////////////
~NetworkRecorder()
~NetworkRecorder() override
{
// Make sure to stop the recording thread
stop();
@ -50,7 +50,7 @@ private:
/// \see SoundRecorder::onStart
///
////////////////////////////////////////////////////////////
virtual bool onStart()
bool onStart() override
{
if (m_socket.connect(m_host, m_port) == sf::Socket::Done)
{
@ -67,7 +67,7 @@ private:
/// \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
sf::Packet packet;
@ -82,7 +82,7 @@ private:
/// \see SoundRecorder::onStop
///
////////////////////////////////////////////////////////////
virtual void onStop()
void onStop() override
{
// Send a "end-of-stream" packet
sf::Packet packet;

View File

@ -71,7 +71,7 @@ private:
/// /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
if ((m_offset >= m_samples.size()) && m_hasFinished)
@ -102,7 +102,7 @@ private:
/// /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;
}

View File

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

View File

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

View File

@ -49,7 +49,7 @@ public:
/// \brief destructor
///
////////////////////////////////////////////////////////////
~SoundBufferRecorder();
~SoundBufferRecorder() override;
////////////////////////////////////////////////////////////
/// \brief Get the sound buffer containing the captured audio data
@ -72,7 +72,7 @@ protected:
/// \return True to start the capture, or false to abort it
///
////////////////////////////////////////////////////////////
virtual bool onStart();
bool onStart() override;
////////////////////////////////////////////////////////////
/// \brief Process a new chunk of recorded samples
@ -83,13 +83,13 @@ protected:
/// \return True to continue the capture, or false to stop it
///
////////////////////////////////////////////////////////////
virtual bool onProcessSamples(const Int16* samples, std::size_t sampleCount);
bool onProcessSamples(const Int16* samples, std::size_t sampleCount) override;
////////////////////////////////////////////////////////////
/// \brief Stop capturing audio data
///
////////////////////////////////////////////////////////////
virtual void onStop();
void onStop() override;
private:

View File

@ -43,7 +43,6 @@ class InputStream;
class SFML_AUDIO_API SoundFileReader
{
public:
////////////////////////////////////////////////////////////
/// \brief Structure holding the audio properties of a sound file
///
@ -136,19 +135,20 @@ public:
/// // 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
/// // (channel count, sample count and sample rate)
/// // 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,
/// // 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
/// }
///
/// 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,
/// // write the given sample rate and channel count to the file header
/// // 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',
/// // convert them (for example to normalized float) if the format requires it

View File

@ -365,7 +365,7 @@ private:
/// stop();
/// }
///
/// virtual bool onStart() // optional
/// bool onStart() override // optional
/// {
/// // Initialize whatever has to be done before the capture starts
/// ...
@ -374,7 +374,7 @@ private:
/// 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, ...)
/// ...
@ -383,7 +383,7 @@ private:
/// return true;
/// }
///
/// virtual void onStop() // optional
/// void onStop() override // optional
/// {
/// // Clean up whatever has to be done after the capture ends
/// ...

View File

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

View File

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

View File

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

View File

@ -100,7 +100,7 @@ protected:
///
/// 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
/// target.draw(m_sprite, states);

View File

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

View File

@ -64,7 +64,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
virtual ~RenderTexture();
~RenderTexture() override;
////////////////////////////////////////////////////////////
/// \brief Create the render-texture
@ -193,7 +193,7 @@ public:
/// \return True if operation was successful, false otherwise
///
////////////////////////////////////////////////////////////
bool setActive(bool active = true);
bool setActive(bool active = true) override;
////////////////////////////////////////////////////////////
/// \brief Update the contents of the target texture
@ -215,7 +215,7 @@ public:
/// \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
///
////////////////////////////////////////////////////////////
virtual bool isSrgb() const;
bool isSrgb() const override;
////////////////////////////////////////////////////////////
/// \brief Get a read-only reference to the target texture

View File

@ -99,7 +99,7 @@ public:
/// Closes the window and frees all the resources attached to it.
///
////////////////////////////////////////////////////////////
virtual ~RenderWindow();
~RenderWindow() override;
////////////////////////////////////////////////////////////
/// \brief Get the size of the rendering region of the window
@ -110,7 +110,7 @@ public:
/// \return Size in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2u getSize() const;
Vector2u getSize() const override;
////////////////////////////////////////////////////////////
@ -121,7 +121,7 @@ public:
/// \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
@ -139,7 +139,7 @@ public:
/// \return True if operation was successful, false otherwise
///
////////////////////////////////////////////////////////////
bool setActive(bool active = true);
bool setActive(bool active = true) override;
////////////////////////////////////////////////////////////
/// \brief Copy the current contents of the window to an image
@ -178,7 +178,7 @@ protected:
/// the window is created.
///
////////////////////////////////////////////////////////////
virtual void onCreate();
void onCreate() override;
////////////////////////////////////////////////////////////
/// \brief Function called after the window has been resized
@ -187,7 +187,7 @@ protected:
/// perform custom actions when the size of the window changes.
///
////////////////////////////////////////////////////////////
virtual void onResize();
void onResize() override;
private:

View File

@ -49,7 +49,7 @@ public:
/// \brief Virtual destructor
///
////////////////////////////////////////////////////////////
virtual ~Shape();
~Shape() override;
////////////////////////////////////////////////////////////
/// \brief Change the source texture of the shape
@ -274,7 +274,7 @@ private:
/// \param states Current render states
///
////////////////////////////////////////////////////////////
virtual void draw(RenderTarget& target, RenderStates states) const;
void draw(RenderTarget& target, RenderStates states) const override;
////////////////////////////////////////////////////////////
/// \brief Update the fill vertices' color

View File

@ -198,7 +198,7 @@ private:
/// \param states Current render states
///
////////////////////////////////////////////////////////////
virtual void draw(RenderTarget& target, RenderStates states) const;
void draw(RenderTarget& target, RenderStates states) const override;
////////////////////////////////////////////////////////////
/// \brief Update the vertices' positions

View File

@ -421,7 +421,7 @@ private:
/// \param states Current render states
///
////////////////////////////////////////////////////////////
virtual void draw(RenderTarget& target, RenderStates states) const;
void draw(RenderTarget& target, RenderStates states) const override;
////////////////////////////////////////////////////////////
/// \brief Make sure the text's geometry is updated

View File

@ -377,7 +377,7 @@ private:
/// \code
/// 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();
/// target.draw(..., states);

View File

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

View File

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

View File

@ -514,7 +514,7 @@ private:
/// \code
/// 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();
/// std::size_t srcSize = getDataSize();
@ -522,7 +522,7 @@ private:
/// 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;
/// const void* dstData = MySuperUnzipFunction(data, size, &dstSize);

View File

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

View File

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

View File

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

View File

@ -102,7 +102,7 @@ public:
/// Closes the window and frees all the resources attached to it.
///
////////////////////////////////////////////////////////////
virtual ~Window();
~Window() override;
////////////////////////////////////////////////////////////
/// \brief Create (or recreate) the window
@ -116,7 +116,7 @@ public:
/// \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
@ -147,7 +147,7 @@ public:
/// \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
@ -176,7 +176,7 @@ public:
/// 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

View File

@ -68,7 +68,7 @@ public:
/// \brief Default constructor
///
////////////////////////////////////////////////////////////
~SoundFileReaderFlac();
~SoundFileReaderFlac() override;
////////////////////////////////////////////////////////////
/// \brief Open a sound file for reading
@ -77,7 +77,7 @@ public:
/// \param info Structure to fill with the attributes of the loaded sound
///
////////////////////////////////////////////////////////////
virtual bool open(sf::InputStream& stream, Info& info);
bool open(sf::InputStream& stream, Info& info) override;
////////////////////////////////////////////////////////////
/// \brief Change the current read position to the given sample offset
@ -92,7 +92,7 @@ public:
/// \param sampleOffset Index of the sample to jump to, relative to the beginning
///
////////////////////////////////////////////////////////////
virtual void seek(Uint64 sampleOffset);
void seek(Uint64 sampleOffset) override;
////////////////////////////////////////////////////////////
/// \brief Read audio samples from the open file
@ -103,7 +103,7 @@ public:
/// \return Number of samples actually read (may be less than \a maxCount)
///
////////////////////////////////////////////////////////////
virtual Uint64 read(Int16* samples, Uint64 maxCount);
Uint64 read(Int16* samples, Uint64 maxCount) override;
public:

View File

@ -66,7 +66,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~SoundFileReaderOgg();
~SoundFileReaderOgg() override;
////////////////////////////////////////////////////////////
/// \brief Open a sound file for reading
@ -77,7 +77,7 @@ public:
/// \return True if the file was successfully opened
///
////////////////////////////////////////////////////////////
virtual bool open(InputStream& stream, Info& info);
bool open(InputStream& stream, Info& info) override;
////////////////////////////////////////////////////////////
/// \brief Change the current read position to the given sample offset
@ -92,7 +92,7 @@ public:
/// \param sampleOffset Index of the sample to jump to, relative to the beginning
///
////////////////////////////////////////////////////////////
virtual void seek(Uint64 sampleOffset);
void seek(Uint64 sampleOffset) override;
////////////////////////////////////////////////////////////
/// \brief Read audio samples from the open file
@ -103,7 +103,7 @@ public:
/// \return Number of samples actually read (may be less than \a maxCount)
///
////////////////////////////////////////////////////////////
virtual Uint64 read(Int16* samples, Uint64 maxCount);
Uint64 read(Int16* samples, Uint64 maxCount) override;
private:

View File

@ -69,7 +69,7 @@ public:
/// \param info Structure to fill with the attributes of the loaded sound
///
////////////////////////////////////////////////////////////
virtual bool open(sf::InputStream& stream, Info& info);
bool open(sf::InputStream& stream, Info& info) override;
////////////////////////////////////////////////////////////
/// \brief Change the current read position to the given sample offset
@ -84,7 +84,7 @@ public:
/// \param sampleOffset Index of the sample to jump to, relative to the beginning
///
////////////////////////////////////////////////////////////
virtual void seek(Uint64 sampleOffset);
void seek(Uint64 sampleOffset) override;
////////////////////////////////////////////////////////////
/// \brief Read audio samples from the open file
@ -95,7 +95,7 @@ public:
/// \return Number of samples actually read (may be less than \a maxCount)
///
////////////////////////////////////////////////////////////
virtual Uint64 read(Int16* samples, Uint64 maxCount);
Uint64 read(Int16* samples, Uint64 maxCount) override;
private:

View File

@ -67,7 +67,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~SoundFileWriterFlac();
~SoundFileWriterFlac() override;
////////////////////////////////////////////////////////////
/// \brief Open a sound file for writing
@ -79,7 +79,7 @@ public:
/// \return True if the file was successfully opened
///
////////////////////////////////////////////////////////////
virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount);
bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) override;
////////////////////////////////////////////////////////////
/// \brief Write audio samples to the open file
@ -88,7 +88,7 @@ public:
/// \param count Number of samples to write
///
////////////////////////////////////////////////////////////
virtual void write(const Int16* samples, Uint64 count);
void write(const Int16* samples, Uint64 count) override;
private:

View File

@ -67,7 +67,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~SoundFileWriterOgg();
~SoundFileWriterOgg() override;
////////////////////////////////////////////////////////////
/// \brief Open a sound file for writing
@ -79,7 +79,7 @@ public:
/// \return True if the file was successfully opened
///
////////////////////////////////////////////////////////////
virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount);
bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) override;
////////////////////////////////////////////////////////////
/// \brief Write audio samples to the open file
@ -88,7 +88,7 @@ public:
/// \param count Number of samples to write
///
////////////////////////////////////////////////////////////
virtual void write(const Int16* samples, Uint64 count);
void write(const Int16* samples, Uint64 count) override;
private:

View File

@ -67,7 +67,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~SoundFileWriterWav();
~SoundFileWriterWav() override;
////////////////////////////////////////////////////////////
/// \brief Open a sound file for writing
@ -79,7 +79,7 @@ public:
/// \return True if the file was successfully opened
///
////////////////////////////////////////////////////////////
virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount);
bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) override;
////////////////////////////////////////////////////////////
/// \brief Write audio samples to the open file
@ -88,7 +88,7 @@ public:
/// \param count Number of samples to write
///
////////////////////////////////////////////////////////////
virtual void write(const Int16* samples, Uint64 count);
void write(const Int16* samples, Uint64 count) override;
private:

View File

@ -56,7 +56,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~RenderTextureImplDefault();
~RenderTextureImplDefault() override;
////////////////////////////////////////////////////////////
/// \brief Get the maximum anti-aliasing level supported by the system
@ -79,7 +79,7 @@ private:
/// \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
@ -89,7 +89,7 @@ private:
/// \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
@ -100,7 +100,7 @@ private:
/// \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
@ -108,7 +108,7 @@ private:
/// \param textureId OpenGL identifier of the target texture
///
////////////////////////////////////////////////////////////
virtual void updateTexture(unsigned textureId);
void updateTexture(unsigned textureId) override;
////////////////////////////////////////////////////////////
// Member data

View File

@ -57,7 +57,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~RenderTextureImplFBO();
~RenderTextureImplFBO() override;
////////////////////////////////////////////////////////////
/// \brief Check whether the system supports FBOs or not
@ -94,7 +94,7 @@ private:
/// \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
@ -112,7 +112,7 @@ private:
/// \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
@ -123,7 +123,7 @@ private:
/// \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
@ -131,7 +131,7 @@ private:
/// \param textureId OpenGL identifier of the target texture
///
////////////////////////////////////////////////////////////
virtual void updateTexture(unsigned textureId);
void updateTexture(unsigned textureId) override;
////////////////////////////////////////////////////////////
// Member data

View File

@ -46,7 +46,7 @@ public:
setp(buffer, buffer + size);
}
~DefaultErrStreamBuf()
~DefaultErrStreamBuf() override
{
// Synchronize
sync();
@ -57,7 +57,7 @@ public:
private:
virtual int overflow(int character)
int overflow(int character) override
{
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
if (pbase() != pptr())

View File

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

View File

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

View File

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

View File

@ -245,7 +245,7 @@ public:
/// \return Handle of the window
///
////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const;
WindowHandle getSystemHandle() const override;
////////////////////////////////////////////////////////////
/// \brief Get the position of the window
@ -253,7 +253,7 @@ public:
/// \return Position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const;
Vector2i getPosition() const override;
////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen
@ -261,7 +261,7 @@ public:
/// \param position New position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual void setPosition(const Vector2i& position);
void setPosition(const Vector2i& position) override;
////////////////////////////////////////////////////////////
/// \brief Get the client size of the window
@ -269,7 +269,7 @@ public:
/// \return Size of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2u getSize() const;
Vector2u getSize() const override;
////////////////////////////////////////////////////////////
/// \brief Change the size of the rendering region of the window
@ -277,7 +277,7 @@ public:
/// \param size New size, in pixels
///
////////////////////////////////////////////////////////////
virtual void setSize(const Vector2u& size);
void setSize(const Vector2u& size) override;
////////////////////////////////////////////////////////////
/// \brief Change the title of the window
@ -285,7 +285,7 @@ public:
/// \param title New title
///
////////////////////////////////////////////////////////////
virtual void setTitle(const String& title);
void setTitle(const String& title) override;
////////////////////////////////////////////////////////////
/// \brief Change the window's icon
@ -295,7 +295,7 @@ public:
/// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits
///
////////////////////////////////////////////////////////////
virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels);
void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override;
////////////////////////////////////////////////////////////
/// \brief Show or hide the window
@ -303,7 +303,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setVisible(bool visible);
void setVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor
@ -311,7 +311,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setMouseCursorVisible(bool visible);
void setMouseCursorVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Grab or release the mouse cursor
@ -319,7 +319,7 @@ public:
/// \param grabbed True to grab, false to release
///
////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed);
void setMouseCursorGrabbed(bool grabbed) override;
////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor
@ -327,7 +327,7 @@ public:
/// \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
@ -335,14 +335,14 @@ public:
/// \param enabled True to enable, false to disable
///
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);
void setKeyRepeatEnabled(bool enabled) override;
////////////////////////////////////////////////////////////
/// \brief Request the current window to be made the active
/// foreground window
///
////////////////////////////////////////////////////////////
virtual void requestFocus();
void requestFocus() override;
////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus
@ -350,7 +350,7 @@ public:
/// \return True if window has focus, false otherwise
///
////////////////////////////////////////////////////////////
virtual bool hasFocus() const;
bool hasFocus() const override;
protected:
@ -358,7 +358,7 @@ protected:
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
void processEvents() override;
private:

View File

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

View File

@ -80,7 +80,7 @@ public:
/// \return Handle of the window
///
////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const;
WindowHandle getSystemHandle() const override;
////////////////////////////////////////////////////////////
/// \brief Get the position of the window
@ -88,7 +88,7 @@ public:
/// \return Position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const;
Vector2i getPosition() const override;
////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen
@ -96,7 +96,7 @@ public:
/// \param position New position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual void setPosition(const Vector2i& position);
void setPosition(const Vector2i& position) override;
////////////////////////////////////////////////////////////
/// \brief Get the client size of the window
@ -104,7 +104,7 @@ public:
/// \return Size of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2u getSize() const;
Vector2u getSize() const override;
////////////////////////////////////////////////////////////
/// \brief Change the size of the rendering region of the window
@ -112,7 +112,7 @@ public:
/// \param size New size, in pixels
///
////////////////////////////////////////////////////////////
virtual void setSize(const Vector2u& size);
void setSize(const Vector2u& size) override;
////////////////////////////////////////////////////////////
/// \brief Change the title of the window
@ -120,7 +120,7 @@ public:
/// \param title New title
///
////////////////////////////////////////////////////////////
virtual void setTitle(const String& title);
void setTitle(const String& title) override;
////////////////////////////////////////////////////////////
/// \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
///
////////////////////////////////////////////////////////////
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
@ -138,7 +138,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setVisible(bool visible);
void setVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor
@ -146,7 +146,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setMouseCursorVisible(bool visible);
void setMouseCursorVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Grab or release the mouse cursor
@ -154,7 +154,7 @@ public:
/// \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
@ -162,7 +162,7 @@ public:
/// \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
@ -170,14 +170,14 @@ public:
/// \param enabled True to enable, false to disable
///
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);
void setKeyRepeatEnabled(bool enabled) override;
////////////////////////////////////////////////////////////
/// \brief Request the current window to be made the active
/// foreground window
///
////////////////////////////////////////////////////////////
virtual void requestFocus();
void requestFocus() override;
////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus
@ -185,7 +185,7 @@ public:
/// \return True if window has focus, false otherwise
///
////////////////////////////////////////////////////////////
virtual bool hasFocus() const;
bool hasFocus() const override;
protected:
@ -193,7 +193,7 @@ protected:
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
void processEvents() override;
private:
@ -266,7 +266,7 @@ private:
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 xRandRMinor XRandR minor version

View File

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

View File

@ -69,7 +69,7 @@ public:
/// \brief Destructor
///
////////////////////////////////////////////////////////////
~WindowImplWin32();
~WindowImplWin32() override;
////////////////////////////////////////////////////////////
/// \brief Get the OS-specific handle of the window
@ -77,7 +77,7 @@ public:
/// \return Handle of the window
///
////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const;
WindowHandle getSystemHandle() const override;
////////////////////////////////////////////////////////////
/// \brief Get the position of the window
@ -85,7 +85,7 @@ public:
/// \return Position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const;
Vector2i getPosition() const override;
////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen
@ -93,7 +93,7 @@ public:
/// \param position New position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual void setPosition(const Vector2i& position);
void setPosition(const Vector2i& position) override;
////////////////////////////////////////////////////////////
/// \brief Get the client size of the window
@ -101,7 +101,7 @@ public:
/// \return Size of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2u getSize() const;
Vector2u getSize() const override;
////////////////////////////////////////////////////////////
/// \brief Change the size of the rendering region of the window
@ -109,7 +109,7 @@ public:
/// \param size New size, in pixels
///
////////////////////////////////////////////////////////////
virtual void setSize(const Vector2u& size);
void setSize(const Vector2u& size) override;
////////////////////////////////////////////////////////////
/// \brief Change the title of the window
@ -117,7 +117,7 @@ public:
/// \param title New title
///
////////////////////////////////////////////////////////////
virtual void setTitle(const String& title);
void setTitle(const String& title) override;
////////////////////////////////////////////////////////////
/// \brief Change the window's icon
@ -127,7 +127,7 @@ public:
/// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits
///
////////////////////////////////////////////////////////////
virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels);
void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override;
////////////////////////////////////////////////////////////
/// \brief Show or hide the window
@ -135,7 +135,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setVisible(bool visible);
void setVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor
@ -143,7 +143,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setMouseCursorVisible(bool visible);
void setMouseCursorVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Grab or release the mouse cursor
@ -151,7 +151,7 @@ public:
/// \param grabbed True to enable, false to disable
///
////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed);
void setMouseCursorGrabbed(bool grabbed) override;
////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor
@ -159,7 +159,7 @@ public:
/// \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
@ -167,14 +167,14 @@ public:
/// \param enabled True to enable, false to disable
///
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);
void setKeyRepeatEnabled(bool enabled) override;
////////////////////////////////////////////////////////////
/// \brief Request the current window to be made the active
/// foreground window
///
////////////////////////////////////////////////////////////
virtual void requestFocus();
void requestFocus() override;
////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus
@ -182,7 +182,7 @@ public:
/// \return True if window has focus, false otherwise
///
////////////////////////////////////////////////////////////
virtual bool hasFocus() const;
bool hasFocus() const override;
protected:
@ -190,7 +190,7 @@ protected:
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
void processEvents() override;
private:

View File

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

View File

@ -81,7 +81,7 @@ public:
/// \return Handle of the window
///
////////////////////////////////////////////////////////////
virtual WindowHandle getSystemHandle() const;
WindowHandle getSystemHandle() const override;
////////////////////////////////////////////////////////////
/// \brief Get the position of the window
@ -89,7 +89,7 @@ public:
/// \return Position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2i getPosition() const;
Vector2i getPosition() const override;
////////////////////////////////////////////////////////////
/// \brief Change the position of the window on screen
@ -97,7 +97,7 @@ public:
/// \param position New position of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual void setPosition(const Vector2i& position);
void setPosition(const Vector2i& position) override;
////////////////////////////////////////////////////////////
/// \brief Get the client size of the window
@ -105,7 +105,7 @@ public:
/// \return Size of the window, in pixels
///
////////////////////////////////////////////////////////////
virtual Vector2u getSize() const;
Vector2u getSize() const override;
////////////////////////////////////////////////////////////
/// \brief Change the size of the rendering region of the window
@ -113,7 +113,7 @@ public:
/// \param size New size, in pixels
///
////////////////////////////////////////////////////////////
virtual void setSize(const Vector2u& size);
void setSize(const Vector2u& size) override;
////////////////////////////////////////////////////////////
/// \brief Change the title of the window
@ -121,7 +121,7 @@ public:
/// \param title New title
///
////////////////////////////////////////////////////////////
virtual void setTitle(const String& title);
void setTitle(const String& title) override;
////////////////////////////////////////////////////////////
/// \brief Change the window's icon
@ -131,7 +131,7 @@ public:
/// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits
///
////////////////////////////////////////////////////////////
virtual void setIcon(unsigned int width, unsigned int height, const Uint8* pixels);
void setIcon(unsigned int width, unsigned int height, const Uint8* pixels) override;
////////////////////////////////////////////////////////////
/// \brief Show or hide the window
@ -139,7 +139,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setVisible(bool visible);
void setVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor
@ -147,7 +147,7 @@ public:
/// \param visible True to show, false to hide
///
////////////////////////////////////////////////////////////
virtual void setMouseCursorVisible(bool visible);
void setMouseCursorVisible(bool visible) override;
////////////////////////////////////////////////////////////
/// \brief Clips or releases the mouse cursor
@ -155,7 +155,7 @@ public:
/// \param grabbed True to enable, false to disable
///
////////////////////////////////////////////////////////////
virtual void setMouseCursorGrabbed(bool grabbed);
void setMouseCursorGrabbed(bool grabbed) override;
////////////////////////////////////////////////////////////
/// \brief Set the displayed cursor to a native system cursor
@ -163,7 +163,7 @@ public:
/// \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
@ -171,14 +171,14 @@ public:
/// \param enabled True to enable, false to disable
///
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);
void setKeyRepeatEnabled(bool enabled) override;
////////////////////////////////////////////////////////////
/// \brief Request the current window to be made the active
/// foreground window
///
////////////////////////////////////////////////////////////
virtual void requestFocus();
void requestFocus() override;
////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus
@ -186,7 +186,7 @@ public:
/// \return True if window has focus, false otherwise
///
////////////////////////////////////////////////////////////
virtual bool hasFocus() const;
bool hasFocus() const override;
public:
@ -220,7 +220,7 @@ protected:
/// \brief Process incoming events from the operating system
///
////////////////////////////////////////////////////////////
virtual void processEvents();
void processEvents() override;
private: