Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
This commit is contained in:
committed by
Michael Lutz
parent
31260e6625
commit
af7d9020a1
@@ -17,30 +17,30 @@
|
||||
/** The allegro video driver. */
|
||||
class VideoDriver_Allegro : public VideoDriver {
|
||||
public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
const char *Start(const char * const *param) override;
|
||||
|
||||
/* virtual */ void Stop();
|
||||
void Stop() override;
|
||||
|
||||
/* virtual */ void MakeDirty(int left, int top, int width, int height);
|
||||
void MakeDirty(int left, int top, int width, int height) override;
|
||||
|
||||
/* virtual */ void MainLoop();
|
||||
void MainLoop() override;
|
||||
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
bool ChangeResolution(int w, int h) override;
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
bool ToggleFullscreen(bool fullscreen) override;
|
||||
|
||||
/* virtual */ bool AfterBlitterChange();
|
||||
bool AfterBlitterChange() override;
|
||||
|
||||
/* virtual */ bool ClaimMousePointer();
|
||||
bool ClaimMousePointer() override;
|
||||
|
||||
/* virtual */ const char *GetName() const { return "allegro"; }
|
||||
const char *GetName() const override { return "allegro"; }
|
||||
};
|
||||
|
||||
/** Factory for the allegro video driver. */
|
||||
class FVideoDriver_Allegro : public DriverFactoryBase {
|
||||
public:
|
||||
FVideoDriver_Allegro() : DriverFactoryBase(Driver::DT_VIDEO, 4, "allegro", "Allegro Video Driver") {}
|
||||
/* virtual */ Driver *CreateInstance() const { return new VideoDriver_Allegro(); }
|
||||
Driver *CreateInstance() const override { return new VideoDriver_Allegro(); }
|
||||
};
|
||||
|
||||
#endif /* VIDEO_ALLEGRO_H */
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
|
||||
class VideoDriver_Cocoa : public VideoDriver {
|
||||
public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
const char *Start(const char * const *param) override;
|
||||
|
||||
/** Stop the video driver */
|
||||
/* virtual */ void Stop();
|
||||
void Stop() override;
|
||||
|
||||
/** Mark dirty a screen region
|
||||
* @param left x-coordinate of left border
|
||||
@@ -27,44 +27,44 @@ public:
|
||||
* @param width width or dirty rectangle
|
||||
* @param height height of dirty rectangle
|
||||
*/
|
||||
/* virtual */ void MakeDirty(int left, int top, int width, int height);
|
||||
void MakeDirty(int left, int top, int width, int height) override;
|
||||
|
||||
/** Programme main loop */
|
||||
/* virtual */ void MainLoop();
|
||||
void MainLoop() override;
|
||||
|
||||
/** Change window resolution
|
||||
* @param w New window width
|
||||
* @param h New window height
|
||||
* @return Whether change was successful
|
||||
*/
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
bool ChangeResolution(int w, int h) override;
|
||||
|
||||
/** Set a new window mode
|
||||
* @param fullscreen Whether to set fullscreen mode or not
|
||||
* @return Whether changing the screen mode was successful
|
||||
*/
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
bool ToggleFullscreen(bool fullscreen) override;
|
||||
|
||||
/** Callback invoked after the blitter was changed.
|
||||
* @return True if no error.
|
||||
*/
|
||||
/* virtual */ bool AfterBlitterChange();
|
||||
bool AfterBlitterChange() override;
|
||||
|
||||
/**
|
||||
* An edit box lost the input focus. Abort character compositing if necessary.
|
||||
*/
|
||||
/* virtual */ void EditBoxLostFocus();
|
||||
void EditBoxLostFocus() override;
|
||||
|
||||
/** Return driver name
|
||||
* @return driver name
|
||||
*/
|
||||
/* virtual */ const char *GetName() const { return "cocoa"; }
|
||||
const char *GetName() const override { return "cocoa"; }
|
||||
};
|
||||
|
||||
class FVideoDriver_Cocoa : public DriverFactoryBase {
|
||||
public:
|
||||
FVideoDriver_Cocoa() : DriverFactoryBase(Driver::DT_VIDEO, 10, "cocoa", "Cocoa Video Driver") {}
|
||||
/* virtual */ Driver *CreateInstance() const { return new VideoDriver_Cocoa(); }
|
||||
Driver *CreateInstance() const override { return new VideoDriver_Cocoa(); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -17,19 +17,19 @@
|
||||
/** The dedicated server video driver. */
|
||||
class VideoDriver_Dedicated : public VideoDriver {
|
||||
public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
const char *Start(const char * const *param) override;
|
||||
|
||||
/* virtual */ void Stop();
|
||||
void Stop() override;
|
||||
|
||||
/* virtual */ void MakeDirty(int left, int top, int width, int height);
|
||||
void MakeDirty(int left, int top, int width, int height) override;
|
||||
|
||||
/* virtual */ void MainLoop();
|
||||
void MainLoop() override;
|
||||
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
bool ChangeResolution(int w, int h) override;
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "dedicated"; }
|
||||
/* virtual */ bool HasGUI() const { return false; }
|
||||
bool ToggleFullscreen(bool fullscreen) override;
|
||||
const char *GetName() const override { return "dedicated"; }
|
||||
bool HasGUI() const override { return false; }
|
||||
};
|
||||
|
||||
/** Factory for the dedicated server video driver. */
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
static const int PRIORITY = 0;
|
||||
#endif
|
||||
FVideoDriver_Dedicated() : DriverFactoryBase(Driver::DT_VIDEO, PRIORITY, "dedicated", "Dedicated Video Driver") {}
|
||||
/* virtual */ Driver *CreateInstance() const { return new VideoDriver_Dedicated(); }
|
||||
Driver *CreateInstance() const override { return new VideoDriver_Dedicated(); }
|
||||
};
|
||||
|
||||
#endif /* VIDEO_DEDICATED_H */
|
||||
|
||||
@@ -20,26 +20,26 @@ private:
|
||||
uint ticks; ///< Amount of ticks to run.
|
||||
|
||||
public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
const char *Start(const char * const *param) override;
|
||||
|
||||
/* virtual */ void Stop();
|
||||
void Stop() override;
|
||||
|
||||
/* virtual */ void MakeDirty(int left, int top, int width, int height);
|
||||
void MakeDirty(int left, int top, int width, int height) override;
|
||||
|
||||
/* virtual */ void MainLoop();
|
||||
void MainLoop() override;
|
||||
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
bool ChangeResolution(int w, int h) override;
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "null"; }
|
||||
/* virtual */ bool HasGUI() const { return false; }
|
||||
bool ToggleFullscreen(bool fullscreen) override;
|
||||
const char *GetName() const override { return "null"; }
|
||||
bool HasGUI() const override { return false; }
|
||||
};
|
||||
|
||||
/** Factory the null video driver. */
|
||||
class FVideoDriver_Null : public DriverFactoryBase {
|
||||
public:
|
||||
FVideoDriver_Null() : DriverFactoryBase(Driver::DT_VIDEO, 0, "null", "Null Video Driver") {}
|
||||
/* virtual */ Driver *CreateInstance() const { return new VideoDriver_Null(); }
|
||||
Driver *CreateInstance() const override { return new VideoDriver_Null(); }
|
||||
};
|
||||
|
||||
#endif /* VIDEO_NULL_H */
|
||||
|
||||
@@ -17,27 +17,27 @@
|
||||
/** The SDL video driver. */
|
||||
class VideoDriver_SDL : public VideoDriver {
|
||||
public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
const char *Start(const char * const *param) override;
|
||||
|
||||
/* virtual */ void Stop();
|
||||
void Stop() override;
|
||||
|
||||
/* virtual */ void MakeDirty(int left, int top, int width, int height);
|
||||
void MakeDirty(int left, int top, int width, int height) override;
|
||||
|
||||
/* virtual */ void MainLoop();
|
||||
void MainLoop() override;
|
||||
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
bool ChangeResolution(int w, int h) override;
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
bool ToggleFullscreen(bool fullscreen) override;
|
||||
|
||||
/* virtual */ bool AfterBlitterChange();
|
||||
bool AfterBlitterChange() override;
|
||||
|
||||
/* virtual */ void AcquireBlitterLock();
|
||||
void AcquireBlitterLock() override;
|
||||
|
||||
/* virtual */ void ReleaseBlitterLock();
|
||||
void ReleaseBlitterLock() override;
|
||||
|
||||
/* virtual */ bool ClaimMousePointer();
|
||||
bool ClaimMousePointer() override;
|
||||
|
||||
/* virtual */ const char *GetName() const { return "sdl"; }
|
||||
const char *GetName() const override { return "sdl"; }
|
||||
private:
|
||||
int PollEvent();
|
||||
bool CreateMainSurface(uint w, uint h);
|
||||
@@ -48,7 +48,7 @@ private:
|
||||
class FVideoDriver_SDL : public DriverFactoryBase {
|
||||
public:
|
||||
FVideoDriver_SDL() : DriverFactoryBase(Driver::DT_VIDEO, 5, "sdl", "SDL Video Driver") {}
|
||||
/* virtual */ Driver *CreateInstance() const { return new VideoDriver_SDL(); }
|
||||
Driver *CreateInstance() const override { return new VideoDriver_SDL(); }
|
||||
};
|
||||
|
||||
#endif /* VIDEO_SDL_H */
|
||||
|
||||
@@ -17,29 +17,29 @@
|
||||
/** The video driver for windows. */
|
||||
class VideoDriver_Win32 : public VideoDriver {
|
||||
public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
const char *Start(const char * const *param) override;
|
||||
|
||||
/* virtual */ void Stop();
|
||||
void Stop() override;
|
||||
|
||||
/* virtual */ void MakeDirty(int left, int top, int width, int height);
|
||||
void MakeDirty(int left, int top, int width, int height) override;
|
||||
|
||||
/* virtual */ void MainLoop();
|
||||
void MainLoop() override;
|
||||
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
bool ChangeResolution(int w, int h) override;
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
bool ToggleFullscreen(bool fullscreen) override;
|
||||
|
||||
/* virtual */ bool AfterBlitterChange();
|
||||
bool AfterBlitterChange() override;
|
||||
|
||||
/* virtual */ void AcquireBlitterLock();
|
||||
void AcquireBlitterLock() override;
|
||||
|
||||
/* virtual */ void ReleaseBlitterLock();
|
||||
void ReleaseBlitterLock() override;
|
||||
|
||||
/* virtual */ bool ClaimMousePointer();
|
||||
bool ClaimMousePointer() override;
|
||||
|
||||
/* virtual */ void EditBoxLostFocus();
|
||||
void EditBoxLostFocus() override;
|
||||
|
||||
/* virtual */ const char *GetName() const { return "win32"; }
|
||||
const char *GetName() const override { return "win32"; }
|
||||
|
||||
bool MakeWindow(bool full_screen);
|
||||
};
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
class FVideoDriver_Win32 : public DriverFactoryBase {
|
||||
public:
|
||||
FVideoDriver_Win32() : DriverFactoryBase(Driver::DT_VIDEO, 10, "win32", "Win32 GDI Video Driver") {}
|
||||
/* virtual */ Driver *CreateInstance() const { return new VideoDriver_Win32(); }
|
||||
Driver *CreateInstance() const override { return new VideoDriver_Win32(); }
|
||||
};
|
||||
|
||||
#endif /* VIDEO_WIN32_H */
|
||||
|
||||
Reference in New Issue
Block a user