From 88ec9aaae3a64a050f3b73d8559416cac8f04e30 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Fri, 26 Jun 2015 00:24:32 +0200 Subject: [PATCH] Drop GCC 4.6 support --- CMakeLists.txt | 35 +++--- INSTALL.md | 6 +- src/app/system_linux.h | 12 +-- src/app/system_macosx.h | 10 +- src/app/system_other.h | 10 +- src/app/system_windows.h | 12 +-- src/graphics/core/framebuffer.h | 24 ++--- src/graphics/opengl/gl21device.h | 112 ++++++++++---------- src/graphics/opengl/gl33device.h | 112 ++++++++++---------- src/graphics/opengl/gldevice.h | 112 ++++++++++---------- src/graphics/opengl/glframebuffer.h | 48 ++++----- src/object/auto/autojostle.h | 10 +- src/sound/oalsound/alsound.h | 58 +++++----- src/ui/list.h | 16 +-- src/ui/window.h | 14 +-- test/unit/app/app_test.cpp | 6 +- test/unit/graphics/engine/lightman_test.cpp | 4 +- 17 files changed, 298 insertions(+), 303 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cff5027..b2944dd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,42 +115,37 @@ set(CMAKE_MODULE_PATH "${colobot_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) # Compiler detection if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") - execute_process( - COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) - if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) - message(STATUS "Detected GCC version 4.7+") - set(CXX11_FLAGS "-std=gnu++11") - add_definitions(-DOVERRIDE=override) - elseif (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.6) - message(STATUS "Detected GCC version 4.6+") - set(CXX11_FLAGS "-std=c++0x") - add_definitions(-DOVERRIDE=) - else() - message(FATAL_ERROR "${PROJECT_NAME} requires GCC 4.6 or greater.") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7) + message(FATAL_ERROR "${PROJECT_NAME} requires GCC 4.7 or greater.") endif() - set(NORMAL_CXX_FLAGS "-Wall -Wold-style-cast") + + message(STATUS "Detected GCC version 4.7+") + + set(NORMAL_CXX_FLAGS "-std=gnu++11 -Wall -Wold-style-cast") set(RELEASE_CXX_FLAGS "-O2") set(DEBUG_CXX_FLAGS "-g -O0") set(TEST_CXX_FLAGS "-pthread") add_definitions(-DNOEXCEPT=noexcept) elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - message(STATUS "Detected Clang compiler") - set(CXX11_FLAGS "-std=c++11") - set(NORMAL_CXX_FLAGS "-Wall -Wold-style-cast") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1) + message(FATAL_ERROR "${PROJECT_NAME} requires Clang 3.1 or greater.") + endif() + + message(STATUS "Detected Clang version 3.1+") + + set(NORMAL_CXX_FLAGS "-std=c++11 -Wall -Wold-style-cast") set(RELEASE_CXX_FLAGS "-O2") set(DEBUG_CXX_FLAGS "-g -O0") set(TEST_CXX_FLAGS "-pthread") - add_definitions(-DOVERRIDE=override) add_definitions(-DNOEXCEPT=noexcept) elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") message(STATUS "Detected MSVC compiler") - set(CXX11_FLAGS "") + set(NORMAL_CXX_FLAGS "/wd\"4244\" /wd\"4309\" /wd\"4800\" /wd\"4996\"") # disable some useless warnings set(RELEASE_CXX_FLAGS "") set(DEBUG_CXX_FLAGS "") set(TEST_CXX_FLAGS "") add_definitions(-DNOEXCEPT=) - add_definitions(-DOVERRIDE=override) else() message(FATAL_ERROR "Your C++ compiler doesn't seem to be supported.") endif() @@ -163,7 +158,7 @@ endif() # Special flags for boost add_definitions(-DBOOST_NO_SCOPED_ENUMS -DBOOST_NO_CXX11_SCOPED_ENUMS) -set(COLOBOT_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NORMAL_CXX_FLAGS} ${CXX11_FLAGS}") +set(COLOBOT_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${NORMAL_CXX_FLAGS}") set(COLOBOT_CXX_FLAGS_RELEASE "${RELEASE_CXX_FLAGS}") set(COLOBOT_CXX_FLAGS_DEBUG "${DEBUG_CXX_FLAGS}") diff --git a/INSTALL.md b/INSTALL.md index f412c2e3..fed781dd 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -53,7 +53,7 @@ Since there are so many Linux flavors, it is difficult to write generic instruct you will need to compile colobot. You will need: - * recent compiler (GCC >= 4.6 or a newer clang) since we are using some features of C++11 + * recent compiler (GCC >= 4.7, or Clang >= 3.1) since we are using some features of C++11 * CMake >= 2.8 * Boost >= 1.51 (header files + components: filesystem and regex) * SDL >= 1.2.10 @@ -103,7 +103,7 @@ Now to configure CMake: ``` where `/some/prefix` is installation prefix where you want to put the game files. It could be a proper installation directory if you want to install colobot in the system or simply temporary directory like `/tmp/colobot-temporary-install` if you just want to try it. -You can also use clang as the compiler. In that case, before issuing cmake, set the following variables: +You can also use Clang as the compiler. In that case, before issuing cmake, set the following variables: ``` $ export CC=clang CXX=clang++ ``` @@ -133,7 +133,7 @@ file for details. ### Other platforms The code isn't particularly tied to any compiler or platform, so in theory it should work on any platform provided you have -the required libraries there. Also, other compilers than currently supported GCC >= 4.6, Clang and MSVC 2013 may happen to work with our code. +the required libraries there. Also, other compilers than currently supported (GCC >= 4.7, Clang >= 3.1 and MSVC 2013) may happen to work with our code. If you can, please try to compile the code on your platform and let us know how it goes. diff --git a/src/app/system_linux.h b/src/app/system_linux.h index 64501c4e..e39e39dd 100644 --- a/src/app/system_linux.h +++ b/src/app/system_linux.h @@ -40,16 +40,16 @@ struct SystemTimeStamp class CSystemUtilsLinux : public CSystemUtils { public: - virtual void Init() OVERRIDE; + virtual void Init() override; - virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE; + virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) override; - virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE; - virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE; + virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) override; + virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override; - virtual std::string GetSaveDir() OVERRIDE; + virtual std::string GetSaveDir() override; - virtual void Usleep(int usec) OVERRIDE; + virtual void Usleep(int usec) override; private: bool m_zenityAvailable; diff --git a/src/app/system_macosx.h b/src/app/system_macosx.h index a853ae42..424a0929 100644 --- a/src/app/system_macosx.h +++ b/src/app/system_macosx.h @@ -28,13 +28,13 @@ class CSystemUtilsMacOSX : public CSystemUtilsOther { public: - virtual void Init() OVERRIDE; + virtual void Init() override; - virtual std::string GetDataPath() OVERRIDE; - virtual std::string GetLangPath() OVERRIDE; - virtual std::string GetSaveDir() OVERRIDE; + virtual std::string GetDataPath() override; + virtual std::string GetLangPath() override; + virtual std::string GetSaveDir() override; - virtual void Usleep(int usec) OVERRIDE; + virtual void Usleep(int usec) override; private: std::string m_ASPath; diff --git a/src/app/system_other.h b/src/app/system_other.h index fc55ae8f..8528c273 100644 --- a/src/app/system_other.h +++ b/src/app/system_other.h @@ -42,12 +42,12 @@ struct SystemTimeStamp class CSystemUtilsOther : public CSystemUtils { public: - virtual void Init() OVERRIDE; - virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE; + virtual void Init() override; + virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) override; - virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE; - virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE; + virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) override; + virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override; - virtual void Usleep(int usec) OVERRIDE; + virtual void Usleep(int usec) override; }; diff --git a/src/app/system_windows.h b/src/app/system_windows.h index ca35ab37..10230384 100644 --- a/src/app/system_windows.h +++ b/src/app/system_windows.h @@ -38,16 +38,16 @@ struct SystemTimeStamp class CSystemUtilsWindows : public CSystemUtils { public: - virtual void Init() OVERRIDE; + virtual void Init() override; - virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) OVERRIDE; + virtual SystemDialogResult SystemDialog(SystemDialogType type, const std::string& title, const std::string& message) override; - virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) OVERRIDE; - virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) OVERRIDE; + virtual void GetCurrentTimeStamp(SystemTimeStamp *stamp) override; + virtual long long TimeStampExactDiff(SystemTimeStamp *before, SystemTimeStamp *after) override; - virtual std::string GetSaveDir() OVERRIDE; + virtual std::string GetSaveDir() override; - virtual void Usleep(int usec) OVERRIDE; + virtual void Usleep(int usec) override; public: static std::string UTF8_Encode(const std::wstring &wstr); diff --git a/src/graphics/core/framebuffer.h b/src/graphics/core/framebuffer.h index d7d296b0..3b61ce1b 100644 --- a/src/graphics/core/framebuffer.h +++ b/src/graphics/core/framebuffer.h @@ -133,40 +133,40 @@ public: explicit CDefaultFramebuffer(const FramebufferParams ¶ms); //! Creates default framebuffer - virtual void Create() OVERRIDE; + virtual void Create() override; //! Destroys default framebuffer - virtual void Destroy() OVERRIDE; + virtual void Destroy() override; //! Returns true - virtual bool IsDefault() OVERRIDE; + virtual bool IsDefault() override; //! Returns width of buffers in this framebuffer - virtual int GetWidth() OVERRIDE; + virtual int GetWidth() override; //! Returns height of buffers in this framebuffer - virtual int GetHeight() OVERRIDE; + virtual int GetHeight() override; //! Returns depth size in bits - virtual int GetDepth() OVERRIDE; + virtual int GetDepth() override; //! Returns number of samples or 1 if multisampling is not supported - virtual int GetSamples() OVERRIDE; + virtual int GetSamples() override; //! Returns texture that contains color buffer or 0 if not available - virtual int GetColorTexture() OVERRIDE; + virtual int GetColorTexture() override; //! Returns texture that contains depth buffer or 0 if not available - virtual int GetDepthTexture() OVERRIDE; + virtual int GetDepthTexture() override; //! Binds this framebuffer to context - virtual void Bind() OVERRIDE; + virtual void Bind() override; //! Unbinds this framebuffer from context - virtual void Unbind() OVERRIDE; + virtual void Unbind() override; //! Copies content of color buffer to screen - virtual void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) OVERRIDE; + virtual void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) override; }; } // end of Gfx diff --git a/src/graphics/opengl/gl21device.h b/src/graphics/opengl/gl21device.h index 52cd9b8b..dd23a726 100644 --- a/src/graphics/opengl/gl21device.h +++ b/src/graphics/opengl/gl21device.h @@ -55,97 +55,97 @@ public: CGL21Device(const DeviceConfig &config); virtual ~CGL21Device(); - virtual void DebugHook() OVERRIDE; - virtual void DebugLights() OVERRIDE; + virtual void DebugHook() override; + virtual void DebugLights() override; - virtual bool Create() OVERRIDE; - virtual void Destroy() OVERRIDE; + virtual bool Create() override; + virtual void Destroy() override; - virtual void ConfigChanged(const DeviceConfig &newConfig) OVERRIDE; + virtual void ConfigChanged(const DeviceConfig &newConfig) override; - virtual void BeginScene() OVERRIDE; - virtual void EndScene() OVERRIDE; + virtual void BeginScene() override; + virtual void EndScene() override; - virtual void Clear() OVERRIDE; + virtual void Clear() override; - virtual void SetTransform(TransformType type, const Math::Matrix &matrix) OVERRIDE; + virtual void SetTransform(TransformType type, const Math::Matrix &matrix) override; - virtual void SetMaterial(const Material &material) OVERRIDE; + virtual void SetMaterial(const Material &material) override; - virtual int GetMaxLightCount() OVERRIDE; - virtual void SetLight(int index, const Light &light) OVERRIDE; - virtual void SetLightEnabled(int index, bool enabled) OVERRIDE; + virtual int GetMaxLightCount() override; + virtual void SetLight(int index, const Light &light) override; + virtual void SetLightEnabled(int index, bool enabled) override; - virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) OVERRIDE; - virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) OVERRIDE; - virtual Texture CreateDepthTexture(int width, int height, int depth) OVERRIDE; - virtual void DestroyTexture(const Texture &texture) OVERRIDE; - virtual void DestroyAllTextures() OVERRIDE; + virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) override; + virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) override; + virtual Texture CreateDepthTexture(int width, int height, int depth) override; + virtual void DestroyTexture(const Texture &texture) override; + virtual void DestroyAllTextures() override; - virtual int GetMaxTextureStageCount() OVERRIDE; - virtual void SetTexture(int index, const Texture &texture) OVERRIDE; - virtual void SetTexture(int index, unsigned int textureId) OVERRIDE; - virtual void SetTextureEnabled(int index, bool enabled) OVERRIDE; + virtual int GetMaxTextureStageCount() override; + virtual void SetTexture(int index, const Texture &texture) override; + virtual void SetTexture(int index, unsigned int textureId) override; + virtual void SetTextureEnabled(int index, bool enabled) override; - virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) OVERRIDE; + virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) override; - virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) OVERRIDE; - virtual void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) OVERRIDE; + virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; + virtual void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override; virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, - Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE; + Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, - Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE; - virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) OVERRIDE; + Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; + virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) override; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE; - virtual void DrawStaticBuffer(unsigned int bufferId) OVERRIDE; - virtual void DestroyStaticBuffer(unsigned int bufferId) OVERRIDE; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + virtual void DrawStaticBuffer(unsigned int bufferId) override; + virtual void DestroyStaticBuffer(unsigned int bufferId) override; - virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) OVERRIDE; + virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) override; - virtual void SetViewport(int x, int y, int width, int height) OVERRIDE; + virtual void SetViewport(int x, int y, int width, int height) override; - virtual void SetRenderState(RenderState state, bool enabled) OVERRIDE; + virtual void SetRenderState(RenderState state, bool enabled) override; - virtual void SetColorMask(bool red, bool green, bool blue, bool alpha) OVERRIDE; + virtual void SetColorMask(bool red, bool green, bool blue, bool alpha) override; - virtual void SetDepthTestFunc(CompFunc func) OVERRIDE; + virtual void SetDepthTestFunc(CompFunc func) override; - virtual void SetDepthBias(float factor, float units) OVERRIDE; + virtual void SetDepthBias(float factor, float units) override; - virtual void SetAlphaTestFunc(CompFunc func, float refValue) OVERRIDE; + virtual void SetAlphaTestFunc(CompFunc func, float refValue) override; - virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) OVERRIDE; + virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) override; - virtual void SetClearColor(const Color &color) OVERRIDE; + virtual void SetClearColor(const Color &color) override; - virtual void SetGlobalAmbient(const Color &color) OVERRIDE; + virtual void SetGlobalAmbient(const Color &color) override; - virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) OVERRIDE; + virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) override; - virtual void SetCullMode(CullMode mode) OVERRIDE; + virtual void SetCullMode(CullMode mode) override; - virtual void SetShadeModel(ShadeModel model) OVERRIDE; + virtual void SetShadeModel(ShadeModel model) override; - virtual void SetShadowColor(float value) OVERRIDE; + virtual void SetShadowColor(float value) override; - virtual void SetFillMode(FillMode mode) OVERRIDE; + virtual void SetFillMode(FillMode mode) override; - virtual void CopyFramebufferToTexture(Texture& texture, int xOffset, int yOffset, int x, int y, int width, int height) OVERRIDE; + virtual void CopyFramebufferToTexture(Texture& texture, int xOffset, int yOffset, int x, int y, int width, int height) override; - virtual void* GetFrameBufferPixels() const OVERRIDE; + virtual void* GetFrameBufferPixels() const override; - virtual CFramebuffer* GetFramebuffer(std::string name) OVERRIDE; + virtual CFramebuffer* GetFramebuffer(std::string name) override; - virtual CFramebuffer* CreateFramebuffer(std::string name, const FramebufferParams& params) OVERRIDE; + virtual CFramebuffer* CreateFramebuffer(std::string name, const FramebufferParams& params) override; - virtual void DeleteFramebuffer(std::string name) OVERRIDE; + virtual void DeleteFramebuffer(std::string name) override; private: //! Updates position for given light based on transformation matrices diff --git a/src/graphics/opengl/gl33device.h b/src/graphics/opengl/gl33device.h index c6364d5d..4505f6ce 100644 --- a/src/graphics/opengl/gl33device.h +++ b/src/graphics/opengl/gl33device.h @@ -54,97 +54,97 @@ public: CGL33Device(const DeviceConfig &config); virtual ~CGL33Device(); - virtual void DebugHook() OVERRIDE; - virtual void DebugLights() OVERRIDE; + virtual void DebugHook() override; + virtual void DebugLights() override; - virtual bool Create() OVERRIDE; - virtual void Destroy() OVERRIDE; + virtual bool Create() override; + virtual void Destroy() override; - virtual void ConfigChanged(const DeviceConfig &newConfig) OVERRIDE; + virtual void ConfigChanged(const DeviceConfig &newConfig) override; - virtual void BeginScene() OVERRIDE; - virtual void EndScene() OVERRIDE; + virtual void BeginScene() override; + virtual void EndScene() override; - virtual void Clear() OVERRIDE; + virtual void Clear() override; - virtual void SetTransform(TransformType type, const Math::Matrix &matrix) OVERRIDE; + virtual void SetTransform(TransformType type, const Math::Matrix &matrix) override; - virtual void SetMaterial(const Material &material) OVERRIDE; + virtual void SetMaterial(const Material &material) override; - virtual int GetMaxLightCount() OVERRIDE; - virtual void SetLight(int index, const Light &light) OVERRIDE; - virtual void SetLightEnabled(int index, bool enabled) OVERRIDE; + virtual int GetMaxLightCount() override; + virtual void SetLight(int index, const Light &light) override; + virtual void SetLightEnabled(int index, bool enabled) override; - virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) OVERRIDE; - virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) OVERRIDE; - virtual Texture CreateDepthTexture(int width, int height, int depth) OVERRIDE; - virtual void DestroyTexture(const Texture &texture) OVERRIDE; - virtual void DestroyAllTextures() OVERRIDE; + virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) override; + virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) override; + virtual Texture CreateDepthTexture(int width, int height, int depth) override; + virtual void DestroyTexture(const Texture &texture) override; + virtual void DestroyAllTextures() override; - virtual int GetMaxTextureStageCount() OVERRIDE; - virtual void SetTexture(int index, const Texture &texture) OVERRIDE; - virtual void SetTexture(int index, unsigned int textureId) OVERRIDE; - virtual void SetTextureEnabled(int index, bool enabled) OVERRIDE; + virtual int GetMaxTextureStageCount() override; + virtual void SetTexture(int index, const Texture &texture) override; + virtual void SetTexture(int index, unsigned int textureId) override; + virtual void SetTextureEnabled(int index, bool enabled) override; - virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) OVERRIDE; + virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) override; - virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) OVERRIDE; - virtual void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) OVERRIDE; + virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; + virtual void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override; virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, - Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE; + Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, - Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE; - virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) OVERRIDE; + Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; + virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) override; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE; - virtual void DrawStaticBuffer(unsigned int bufferId) OVERRIDE; - virtual void DestroyStaticBuffer(unsigned int bufferId) OVERRIDE; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + virtual void DrawStaticBuffer(unsigned int bufferId) override; + virtual void DestroyStaticBuffer(unsigned int bufferId) override; - virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) OVERRIDE; + virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) override; - virtual void SetViewport(int x, int y, int width, int height) OVERRIDE; + virtual void SetViewport(int x, int y, int width, int height) override; - virtual void SetRenderState(RenderState state, bool enabled) OVERRIDE; + virtual void SetRenderState(RenderState state, bool enabled) override; - virtual void SetColorMask(bool red, bool green, bool blue, bool alpha) OVERRIDE; + virtual void SetColorMask(bool red, bool green, bool blue, bool alpha) override; - virtual void SetDepthTestFunc(CompFunc func) OVERRIDE; + virtual void SetDepthTestFunc(CompFunc func) override; - virtual void SetDepthBias(float factor, float units) OVERRIDE; + virtual void SetDepthBias(float factor, float units) override; - virtual void SetAlphaTestFunc(CompFunc func, float refValue) OVERRIDE; + virtual void SetAlphaTestFunc(CompFunc func, float refValue) override; - virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) OVERRIDE; + virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) override; - virtual void SetClearColor(const Color &color) OVERRIDE; + virtual void SetClearColor(const Color &color) override; - virtual void SetGlobalAmbient(const Color &color) OVERRIDE; + virtual void SetGlobalAmbient(const Color &color) override; - virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) OVERRIDE; + virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) override; - virtual void SetCullMode(CullMode mode) OVERRIDE; + virtual void SetCullMode(CullMode mode) override; - virtual void SetShadeModel(ShadeModel model) OVERRIDE; + virtual void SetShadeModel(ShadeModel model) override; - virtual void SetShadowColor(float value) OVERRIDE; + virtual void SetShadowColor(float value) override; - virtual void SetFillMode(FillMode mode) OVERRIDE; + virtual void SetFillMode(FillMode mode) override; - virtual void CopyFramebufferToTexture(Texture& texture, int xOffset, int yOffset, int x, int y, int width, int height) OVERRIDE; + virtual void CopyFramebufferToTexture(Texture& texture, int xOffset, int yOffset, int x, int y, int width, int height) override; - virtual void* GetFrameBufferPixels() const OVERRIDE; + virtual void* GetFrameBufferPixels() const override; - virtual CFramebuffer* GetFramebuffer(std::string name) OVERRIDE; + virtual CFramebuffer* GetFramebuffer(std::string name) override; - virtual CFramebuffer* CreateFramebuffer(std::string name, const FramebufferParams& params) OVERRIDE; + virtual CFramebuffer* CreateFramebuffer(std::string name, const FramebufferParams& params) override; - virtual void DeleteFramebuffer(std::string name) OVERRIDE; + virtual void DeleteFramebuffer(std::string name) override; private: //! Updates position for given light based on transformation matrices diff --git a/src/graphics/opengl/gldevice.h b/src/graphics/opengl/gldevice.h index b9c21501..6cb9c52a 100644 --- a/src/graphics/opengl/gldevice.h +++ b/src/graphics/opengl/gldevice.h @@ -74,97 +74,97 @@ public: CGLDevice(const DeviceConfig &config); virtual ~CGLDevice(); - virtual void DebugHook() OVERRIDE; - virtual void DebugLights() OVERRIDE; + virtual void DebugHook() override; + virtual void DebugLights() override; - virtual bool Create() OVERRIDE; - virtual void Destroy() OVERRIDE; + virtual bool Create() override; + virtual void Destroy() override; - virtual void ConfigChanged(const DeviceConfig &newConfig) OVERRIDE; + virtual void ConfigChanged(const DeviceConfig &newConfig) override; - virtual void BeginScene() OVERRIDE; - virtual void EndScene() OVERRIDE; + virtual void BeginScene() override; + virtual void EndScene() override; - virtual void Clear() OVERRIDE; + virtual void Clear() override; - virtual void SetTransform(TransformType type, const Math::Matrix &matrix) OVERRIDE; + virtual void SetTransform(TransformType type, const Math::Matrix &matrix) override; - virtual void SetMaterial(const Material &material) OVERRIDE; + virtual void SetMaterial(const Material &material) override; - virtual int GetMaxLightCount() OVERRIDE; - virtual void SetLight(int index, const Light &light) OVERRIDE; - virtual void SetLightEnabled(int index, bool enabled) OVERRIDE; + virtual int GetMaxLightCount() override; + virtual void SetLight(int index, const Light &light) override; + virtual void SetLightEnabled(int index, bool enabled) override; - virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) OVERRIDE; - virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) OVERRIDE; - virtual Texture CreateDepthTexture(int width, int height, int depth) OVERRIDE; - virtual void DestroyTexture(const Texture &texture) OVERRIDE; - virtual void DestroyAllTextures() OVERRIDE; + virtual Texture CreateTexture(CImage *image, const TextureCreateParams ¶ms) override; + virtual Texture CreateTexture(ImageData *data, const TextureCreateParams ¶ms) override; + virtual Texture CreateDepthTexture(int width, int height, int depth) override; + virtual void DestroyTexture(const Texture &texture) override; + virtual void DestroyAllTextures() override; - virtual int GetMaxTextureStageCount() OVERRIDE; - virtual void SetTexture(int index, const Texture &texture) OVERRIDE; - virtual void SetTexture(int index, unsigned int textureId) OVERRIDE; - virtual void SetTextureEnabled(int index, bool enabled) OVERRIDE; + virtual int GetMaxTextureStageCount() override; + virtual void SetTexture(int index, const Texture &texture) override; + virtual void SetTexture(int index, unsigned int textureId) override; + virtual void SetTextureEnabled(int index, bool enabled) override; - virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) OVERRIDE; + virtual void SetTextureStageParams(int index, const TextureStageParams ¶ms) override; - virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) OVERRIDE; - virtual void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) OVERRIDE; + virtual void SetTextureStageWrap(int index, Gfx::TexWrapMode wrapS, Gfx::TexWrapMode wrapT) override; + virtual void SetTextureCoordGeneration(int index, TextureGenerationParams ¶ms) override; virtual void DrawPrimitive(PrimitiveType type, const Vertex *vertices , int vertexCount, - Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE; + Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; virtual void DrawPrimitive(PrimitiveType type, const VertexTex2 *vertices, int vertexCount, - Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) OVERRIDE; - virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) OVERRIDE; + Color color = Color(1.0f, 1.0f, 1.0f, 1.0f)) override; + virtual void DrawPrimitive(PrimitiveType type, const VertexCol *vertices , int vertexCount) override; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE; - virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) OVERRIDE; - virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) OVERRIDE; - virtual void DrawStaticBuffer(unsigned int bufferId) OVERRIDE; - virtual void DestroyStaticBuffer(unsigned int bufferId) OVERRIDE; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; + virtual unsigned int CreateStaticBuffer(PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const Vertex* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexTex2* vertices, int vertexCount) override; + virtual void UpdateStaticBuffer(unsigned int bufferId, PrimitiveType primitiveType, const VertexCol* vertices, int vertexCount) override; + virtual void DrawStaticBuffer(unsigned int bufferId) override; + virtual void DestroyStaticBuffer(unsigned int bufferId) override; - virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) OVERRIDE; + virtual int ComputeSphereVisibility(const Math::Vector ¢er, float radius) override; - virtual void SetViewport(int x, int y, int width, int height) OVERRIDE; + virtual void SetViewport(int x, int y, int width, int height) override; - virtual void SetRenderState(RenderState state, bool enabled) OVERRIDE; + virtual void SetRenderState(RenderState state, bool enabled) override; - virtual void SetColorMask(bool red, bool green, bool blue, bool alpha) OVERRIDE; + virtual void SetColorMask(bool red, bool green, bool blue, bool alpha) override; - virtual void SetDepthTestFunc(CompFunc func) OVERRIDE; + virtual void SetDepthTestFunc(CompFunc func) override; - virtual void SetDepthBias(float factor, float units) OVERRIDE; + virtual void SetDepthBias(float factor, float units) override; - virtual void SetAlphaTestFunc(CompFunc func, float refValue) OVERRIDE; + virtual void SetAlphaTestFunc(CompFunc func, float refValue) override; - virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) OVERRIDE; + virtual void SetBlendFunc(BlendFunc srcBlend, BlendFunc dstBlend) override; - virtual void SetClearColor(const Color &color) OVERRIDE; + virtual void SetClearColor(const Color &color) override; - virtual void SetGlobalAmbient(const Color &color) OVERRIDE; + virtual void SetGlobalAmbient(const Color &color) override; - virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) OVERRIDE; + virtual void SetFogParams(FogMode mode, const Color &color, float start, float end, float density) override; - virtual void SetCullMode(CullMode mode) OVERRIDE; + virtual void SetCullMode(CullMode mode) override; - virtual void SetShadeModel(ShadeModel model) OVERRIDE; + virtual void SetShadeModel(ShadeModel model) override; - virtual void SetShadowColor(float value) OVERRIDE; + virtual void SetShadowColor(float value) override; - virtual void SetFillMode(FillMode mode) OVERRIDE; + virtual void SetFillMode(FillMode mode) override; - virtual void CopyFramebufferToTexture(Texture& texture, int xOffset, int yOffset, int x, int y, int width, int height) OVERRIDE; + virtual void CopyFramebufferToTexture(Texture& texture, int xOffset, int yOffset, int x, int y, int width, int height) override; - virtual void* GetFrameBufferPixels() const OVERRIDE; + virtual void* GetFrameBufferPixels() const override; - virtual CFramebuffer* GetFramebuffer(std::string name) OVERRIDE; + virtual CFramebuffer* GetFramebuffer(std::string name) override; - virtual CFramebuffer* CreateFramebuffer(std::string name, const FramebufferParams& params) OVERRIDE; + virtual CFramebuffer* CreateFramebuffer(std::string name, const FramebufferParams& params) override; - virtual void DeleteFramebuffer(std::string name) OVERRIDE; + virtual void DeleteFramebuffer(std::string name) override; private: //! Updates internal modelview matrix diff --git a/src/graphics/opengl/glframebuffer.h b/src/graphics/opengl/glframebuffer.h index 27ced140..bae67fec 100644 --- a/src/graphics/opengl/glframebuffer.h +++ b/src/graphics/opengl/glframebuffer.h @@ -49,29 +49,29 @@ protected: public: CGLFramebuffer(const FramebufferParams& params); - virtual void Create() OVERRIDE; + virtual void Create() override; - virtual void Destroy() OVERRIDE; + virtual void Destroy() override; - virtual bool IsDefault() OVERRIDE; + virtual bool IsDefault() override; - virtual int GetWidth() OVERRIDE; + virtual int GetWidth() override; - virtual int GetHeight() OVERRIDE; + virtual int GetHeight() override; - virtual int GetDepth() OVERRIDE; + virtual int GetDepth() override; - virtual int GetSamples() OVERRIDE; + virtual int GetSamples() override; - virtual int GetColorTexture() OVERRIDE; + virtual int GetColorTexture() override; - virtual int GetDepthTexture() OVERRIDE; + virtual int GetDepthTexture() override; - virtual void Bind() OVERRIDE; + virtual void Bind() override; - virtual void Unbind() OVERRIDE; + virtual void Unbind() override; - virtual void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) OVERRIDE; + virtual void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) override; }; /** @@ -99,29 +99,29 @@ protected: public: CGLFramebufferEXT(const FramebufferParams& params); - virtual void Create() OVERRIDE; + virtual void Create() override; - virtual void Destroy() OVERRIDE; + virtual void Destroy() override; - virtual bool IsDefault() OVERRIDE; + virtual bool IsDefault() override; - virtual int GetWidth() OVERRIDE; + virtual int GetWidth() override; - virtual int GetHeight() OVERRIDE; + virtual int GetHeight() override; - virtual int GetDepth() OVERRIDE; + virtual int GetDepth() override; - virtual int GetSamples() OVERRIDE; + virtual int GetSamples() override; - virtual int GetColorTexture() OVERRIDE; + virtual int GetColorTexture() override; - virtual int GetDepthTexture() OVERRIDE; + virtual int GetDepthTexture() override; - virtual void Bind() OVERRIDE; + virtual void Bind() override; - virtual void Unbind() OVERRIDE; + virtual void Unbind() override; - virtual void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) OVERRIDE; + virtual void CopyToScreen(int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) override; }; } // end of Gfx diff --git a/src/object/auto/autojostle.h b/src/object/auto/autojostle.h index 932ccb79..36397766 100644 --- a/src/object/auto/autojostle.h +++ b/src/object/auto/autojostle.h @@ -32,16 +32,16 @@ public: CAutoJostle(CObject* object); ~CAutoJostle(); - void DeleteObject(bool bAll=false) OVERRIDE; + void DeleteObject(bool bAll=false) override; - void Init() OVERRIDE; + void Init() override; void Start(int param, float force); - bool EventProcess(const Event &event) OVERRIDE; - Error IsEnded() OVERRIDE; + bool EventProcess(const Event &event) override; + Error IsEnded() override; private: // Overriden to avoid warning about hiding virtual function - void Start(int param) OVERRIDE; + void Start(int param) override; protected: float m_force; diff --git a/src/sound/oalsound/alsound.h b/src/sound/oalsound/alsound.h index 7a19abb7..895b5ac3 100644 --- a/src/sound/oalsound/alsound.h +++ b/src/sound/oalsound/alsound.h @@ -50,40 +50,40 @@ public: ALSound(); ~ALSound(); - bool Create() OVERRIDE; - bool Cache(Sound, const std::string &) OVERRIDE; - bool CacheMusic(const std::string &) OVERRIDE; - bool IsCached(Sound) OVERRIDE; - bool IsCachedMusic(const std::string &) OVERRIDE; + bool Create() override; + bool Cache(Sound, const std::string &) override; + bool CacheMusic(const std::string &) override; + bool IsCached(Sound) override; + bool IsCachedMusic(const std::string &) override; - bool GetEnable() OVERRIDE; + bool GetEnable() override; - void SetAudioVolume(int volume) OVERRIDE; - int GetAudioVolume() OVERRIDE; - void SetMusicVolume(int volume) OVERRIDE; - int GetMusicVolume() OVERRIDE; + void SetAudioVolume(int volume) override; + int GetAudioVolume() override; + void SetMusicVolume(int volume) override; + int GetMusicVolume() override; - void SetListener(const Math::Vector &eye, const Math::Vector &lookat) OVERRIDE; - void FrameMove(float rTime) OVERRIDE; + void SetListener(const Math::Vector &eye, const Math::Vector &lookat) override; + void FrameMove(float rTime) override; - int Play(Sound sound, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) OVERRIDE; - int Play(Sound sound, const Math::Vector &pos, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) OVERRIDE; - bool FlushEnvelope(int channel) OVERRIDE; - bool AddEnvelope(int channel, float amplitude, float frequency, float time, SoundNext oper) OVERRIDE; - bool Position(int channel, const Math::Vector &pos) OVERRIDE; - bool Frequency(int channel, float frequency) OVERRIDE; - bool Stop(int channel) OVERRIDE; - bool StopAll() OVERRIDE; - bool MuteAll(bool bMute) OVERRIDE; + int Play(Sound sound, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) override; + int Play(Sound sound, const Math::Vector &pos, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false) override; + bool FlushEnvelope(int channel) override; + bool AddEnvelope(int channel, float amplitude, float frequency, float time, SoundNext oper) override; + bool Position(int channel, const Math::Vector &pos) override; + bool Frequency(int channel, float frequency) override; + bool Stop(int channel) override; + bool StopAll() override; + bool MuteAll(bool bMute) override; - bool PlayMusic(int rank, bool bRepeat, float fadeTime=2.0f) OVERRIDE; - bool PlayMusic(const std::string &filename, bool bRepeat, float fadeTime=2.0f) OVERRIDE; - bool RestartMusic() OVERRIDE; - void SuspendMusic() OVERRIDE; - void StopMusic(float fadeTime=2.0f) OVERRIDE; - bool IsPlayingMusic() OVERRIDE; - bool PlayPauseMusic(const std::string &filename, bool repeat) OVERRIDE; - void StopPauseMusic() OVERRIDE; + bool PlayMusic(int rank, bool bRepeat, float fadeTime=2.0f) override; + bool PlayMusic(const std::string &filename, bool bRepeat, float fadeTime=2.0f) override; + bool RestartMusic() override; + void SuspendMusic() override; + void StopMusic(float fadeTime=2.0f) override; + bool IsPlayingMusic() override; + bool PlayPauseMusic(const std::string &filename, bool repeat) override; + void StopPauseMusic() override; private: void CleanUp(); diff --git a/src/ui/list.h b/src/ui/list.h index e24f9acf..60ac4b30 100644 --- a/src/ui/list.h +++ b/src/ui/list.h @@ -47,15 +47,15 @@ class CList : public CControl bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg, float expand); - void SetPos(Math::Point pos) OVERRIDE; - void SetDim(Math::Point dim) OVERRIDE; + void SetPos(Math::Point pos) override; + void SetDim(Math::Point dim) override; - bool SetState(int state, bool bState) OVERRIDE; - bool SetState(int state) OVERRIDE; - bool ClearState(int state) OVERRIDE; + bool SetState(int state, bool bState) override; + bool SetState(int state) override; + bool ClearState(int state) override; - bool EventProcess(const Event &event) OVERRIDE; - void Draw() OVERRIDE; + bool EventProcess(const Event &event) override; + void Draw() override; void Flush(); @@ -97,7 +97,7 @@ class CList : public CControl private: // Overridden to avoid warning about hiding the virtual function - virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) OVERRIDE; + virtual bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType) override; protected: CButton* m_button[LISTMAXDISPLAY]; diff --git a/src/ui/window.h b/src/ui/window.h index 61bf9cb8..abc4ce7f 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -60,7 +60,7 @@ public: ~CWindow(); void Flush(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) OVERRIDE; + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg) override; CButton* CreateButton(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); CColor* CreateColor(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); CCheck* CreateCheck(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); @@ -85,13 +85,13 @@ public: EventType GetEventTypeFull(); EventType GetEventTypeClose(); - virtual void SetName(std::string name, bool tooltip = true) OVERRIDE; + virtual void SetName(std::string name, bool tooltip = true) override; void SetTrashEvent(bool bTrash); bool GetTrashEvent(); - void SetPos(Math::Point pos) OVERRIDE; - void SetDim(Math::Point dim) OVERRIDE; + void SetPos(Math::Point pos) override; + void SetDim(Math::Point dim) override; void SetMinDim(Math::Point dim); void SetMaxDim(Math::Point dim); @@ -114,11 +114,11 @@ public: void SetFixed(bool bFix); bool GetFixed(); - bool GetTooltip(Math::Point pos, std::string &name) OVERRIDE; + bool GetTooltip(Math::Point pos, std::string &name) override; - bool EventProcess(const Event &event) OVERRIDE; + bool EventProcess(const Event &event) override; - void Draw() OVERRIDE; + void Draw() override; protected: int BorderDetect(Math::Point pos); diff --git a/test/unit/app/app_test.cpp b/test/unit/app/app_test.cpp index 0fb26afa..d3ab0864 100644 --- a/test/unit/app/app_test.cpp +++ b/test/unit/app/app_test.cpp @@ -47,7 +47,7 @@ struct FakeSystemTimeStamp : public SystemTimeStamp class CApplicationWrapper : public CApplication { public: - Event CreateUpdateEvent() OVERRIDE + Event CreateUpdateEvent() override { return CApplication::CreateUpdateEvent(); } @@ -65,8 +65,8 @@ protected: ~ApplicationUT() NOEXCEPT {} - void SetUp() OVERRIDE; - void TearDown() OVERRIDE; + void SetUp() override; + void TearDown() override; void NextInstant(long long diff); diff --git a/test/unit/graphics/engine/lightman_test.cpp b/test/unit/graphics/engine/lightman_test.cpp index ac5b76ef..736a79a3 100644 --- a/test/unit/graphics/engine/lightman_test.cpp +++ b/test/unit/graphics/engine/lightman_test.cpp @@ -41,8 +41,8 @@ protected: ~LightManagerUT() NOEXCEPT {} - void SetUp() OVERRIDE; - void TearDown() OVERRIDE; + void SetUp() override; + void TearDown() override; void PrepareLightTesting(int maxLights, Math::Vector eyePos); void CheckLightSorting(EngineObjectType objectType, const std::vector& expectedLights);