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 14, 2020
1 parent 0a2e593 commit f79373f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion src/windows/glog/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,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 f79373f

Please sign in to comment.