From 31da36991d84eab5b3ad3e6a8fc16fd58ed84aa4 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Tue, 9 May 2023 17:18:56 +0200 Subject: [PATCH] Build: Set missing override as error I couldn't find a similar flag for MSVC --- include/Nazara/Audio/Music.hpp | 4 ++-- plugins/Assimp/Plugin.cpp | 4 ++-- xmake.lua | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/Nazara/Audio/Music.hpp b/include/Nazara/Audio/Music.hpp index 4efcb36ea..ffa69a46f 100644 --- a/include/Nazara/Audio/Music.hpp +++ b/include/Nazara/Audio/Music.hpp @@ -38,7 +38,7 @@ namespace Nz Time GetDuration() const override; AudioFormat GetFormat() const; - Time GetPlayingOffset() const; + Time GetPlayingOffset() const override; UInt64 GetSampleCount() const; UInt64 GetSampleOffset() const override; UInt32 GetSampleRate() const override; @@ -53,7 +53,7 @@ namespace Nz void Pause() override; void Play() override; - void SeekToSampleOffset(UInt64 offset); + void SeekToSampleOffset(UInt64 offset) override; void Stop() override; diff --git a/plugins/Assimp/Plugin.cpp b/plugins/Assimp/Plugin.cpp index 341a41aea..1b5a5565f 100644 --- a/plugins/Assimp/Plugin.cpp +++ b/plugins/Assimp/Plugin.cpp @@ -918,7 +918,7 @@ namespace meshLoader.UnregisterLoader(m_meshLoaderEntry); } - std::string_view GetDescription() const + std::string_view GetDescription() const override { return "Adds supports to load meshes and animations using Assimp"; } @@ -963,4 +963,4 @@ extern "C" return plugin.release(); } } -#endif \ No newline at end of file +#endif diff --git a/xmake.lua b/xmake.lua index cab5fb194..5a6eb3da9 100644 --- a/xmake.lua +++ b/xmake.lua @@ -378,7 +378,9 @@ if is_plat("windows") then else -- GCC-compatible (GCC, Clang, ...) add_cxflags("-Wtrampolines") + add_cxflags("-Werror=inconsistent-missing-override", {tools = "clang"}) add_cxflags("-Werror=reorder") + add_cxflags("-Werror=suggest-override", {tools = "gcc"}) add_cxflags("-Werror=switch") end