Add -Wsuggest-override (#264)
We also add the suggested `override` keyword.
This commit is contained in:
parent
12e496da3d
commit
66b52e6cc9
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user