From 725818984761d85e69a24a7d7864d9f046811e34 Mon Sep 17 00:00:00 2001 From: Santiago Gil Date: Thu, 24 Sep 2020 10:48:00 +0100 Subject: [PATCH] Add `override` to `LogStreamBuf::overflow()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents warnings such as: ``` glog/logging.h:1122:20: error: ‘virtual std::basic_streambuf::int_type google::base_logging::LogStreamBuf::overflow(std::basic_streambuf::int_type)’ can be marked override [-Werror=suggest-override] virtual int_type overflow(int_type ch) { ^~~~~~~~ ``` Signed-off-by: Santiago Gil --- src/glog/logging.h.in | 2 +- src/windows/glog/logging.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in index 1e552fc1a..8901b9cdc 100644 --- a/src/glog/logging.h.in +++ b/src/glog/logging.h.in @@ -1128,7 +1128,7 @@ class GOOGLE_GLOG_DLL_DECL LogStreamBuf : public std::streambuf { } // This effectively ignores overflow. - virtual int_type overflow(int_type ch) { + int_type overflow(int_type ch) { return ch; } diff --git a/src/windows/glog/logging.h b/src/windows/glog/logging.h index e111bf07c..f42d936f6 100755 --- a/src/windows/glog/logging.h +++ b/src/windows/glog/logging.h @@ -1129,7 +1129,7 @@ class GOOGLE_GLOG_DLL_DECL LogStreamBuf : public std::streambuf { } // This effectively ignores overflow. - virtual int_type overflow(int_type ch) { + int_type overflow(int_type ch) { return ch; }