Skip to content

Commit

Permalink
Add override to LogStreamBuf::overflow()
Browse files Browse the repository at this point in the history
Prevents warnings such as:
```
glog/logging.h:1122:20: error: ‘virtual
std::basic_streambuf<char>::int_type
google::base_logging::LogStreamBuf::overflow(std::basic_streambuf<char>::int_type)’
can be marked override [-Werror=suggest-override]
   virtual int_type overflow(int_type ch) {
                    ^~~~~~~~
```

Signed-off-by: Santiago Gil <[email protected]>
  • Loading branch information
Santiago Gil committed Sep 7, 2020
1 parent 0a2e593 commit 3fb7a75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/glog/logging.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ class GOOGLE_GLOG_DLL_DECL LogStreamBuf : public std::streambuf {
}

// This effectively ignores overflow.
virtual int_type overflow(int_type ch) {
virtual int_type overflow(int_type ch) override {
return ch;
}

Expand Down

0 comments on commit 3fb7a75

Please sign in to comment.