Skip to content

Commit 38473d3

Browse files
cuavasThePhD
authored andcommitted
Add override qualifier to bad_optional_access::what() - fixes GCC -Wsuggest-override warning
1 parent d0eba0a commit 38473d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/sol/optional_implementation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ namespace sol {
657657
class bad_optional_access : public std::exception {
658658
public:
659659
bad_optional_access() = default;
660-
const char* what() const noexcept {
660+
const char* what() const noexcept override {
661661
return "Optional has no value";
662662
}
663663
};

single/include/sol/sol.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4631,7 +4631,7 @@ namespace sol {
46314631
class bad_optional_access : public std::exception {
46324632
public:
46334633
bad_optional_access() = default;
4634-
const char* what() const noexcept {
4634+
const char* what() const noexcept override {
46354635
return "Optional has no value";
46364636
}
46374637
};

0 commit comments

Comments
 (0)