Skip to content

Commit

Permalink
Add override qualifier to bad_optional_access::what() - fixes GCC -Ws…
Browse files Browse the repository at this point in the history
…uggest-override warning
  • Loading branch information
cuavas authored and ThePhD committed Nov 19, 2020
1 parent d0eba0a commit 38473d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/sol/optional_implementation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ namespace sol {
class bad_optional_access : public std::exception {
public:
bad_optional_access() = default;
const char* what() const noexcept {
const char* what() const noexcept override {
return "Optional has no value";
}
};
Expand Down
2 changes: 1 addition & 1 deletion single/include/sol/sol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4631,7 +4631,7 @@ namespace sol {
class bad_optional_access : public std::exception {
public:
bad_optional_access() = default;
const char* what() const noexcept {
const char* what() const noexcept override {
return "Optional has no value";
}
};
Expand Down

0 comments on commit 38473d3

Please sign in to comment.