Skip to content

Commit

Permalink
Enable suggest-override warning and fix instances
Browse files Browse the repository at this point in the history
  • Loading branch information
fliiiix authored and gittiver committed Sep 1, 2024
1 parent 3ec06b0 commit 5af2513
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cmake/compiler_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function(add_warnings_optimizations target_name)
-Wall
-Wextra
-Wpedantic
-Wsuggest-override
$<$<CONFIG:RELEASE>:-O2>
$<$<CONFIG:DEBUG>:-O0 -g>
)
Expand All @@ -29,6 +30,7 @@ function(add_warnings_optimizations target_name)
-Wall
-Wextra
-Wpedantic
-Wsuggest-override
$<$<CONFIG:RELEASE>:-O2>
$<$<CONFIG:DEBUG>:-O0 -g -pg>
)
Expand All @@ -38,6 +40,7 @@ function(add_warnings_optimizations target_name)
-Wall
-Wextra
-Wpedantic
-Wsuggest-override
$<$<CONFIG:RELEASE>:-O2>
$<$<CONFIG:DEBUG>:-O0 -g -p -pg>
)
Expand Down
2 changes: 1 addition & 1 deletion include/crow/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ namespace crow // NOTE: Already documented in "crow/app.h"
return ret;
}

std::string dump() const
std::string dump() const override
{
static constexpr int DontIndent = -1;

Expand Down
2 changes: 1 addition & 1 deletion include/crow/mustache.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace crow // NOTE: Already documented in "crow/app.h"
invalid_template_exception(const std::string& msg):
msg("crow::mustache error: " + msg)
{}
virtual const char* what() const throw()
virtual const char* what() const throw() override
{
return msg.c_str();
}
Expand Down

0 comments on commit 5af2513

Please sign in to comment.