diff options
author | fiesh <fiesh@zefix.tv> | 2020-10-21 02:24:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-21 02:24:41 +0300 |
commit | 66b52e6cc9f3f2429dcb01ddb90b6c2f156ac67f (patch) | |
tree | 1cf0c2be9bb93916c59f2b0f9716b7acaf7c6ab7 | |
parent | 12e496da3d486b87fa9df43edea65232ed852510 (diff) |
Add -Wsuggest-override (#264)
We also add the suggested `override` keyword.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | include/cxxopts.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3098445..feec2cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ set(CMAKE_CXX_EXTENSIONS OFF) if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W2") elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow -Weffc++ -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -Wshadow -Weffc++ -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion -Wsuggest-override") endif() add_library(cxxopts INTERFACE) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 88e8a02..6ec7998 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -951,7 +951,7 @@ namespace cxxopts CXXOPTS_NODISCARD std::shared_ptr<Value> - clone() const + clone() const override { return std::make_shared<standard_value<T>>(*this); } |