From aeb1ef57f0271e3e7b3f2a5ffe3333ee8a539e84 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 26 Apr 2021 23:36:04 +0800 Subject: [PATCH] common/StackStringStream: make override method with "final" this change also silences the warnings like: src/common/StackStringStream.h:75:7: warning: 'overflow' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] int overflow(int c) ^ Signed-off-by: Kefu Chai --- src/common/StackStringStream.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/StackStringStream.h b/src/common/StackStringStream.h index 8bd70fc1a110a..3324e7add3538 100644 --- a/src/common/StackStringStream.h +++ b/src/common/StackStringStream.h @@ -54,7 +54,7 @@ public: } protected: - std::streamsize xsputn(const char *s, std::streamsize n) + std::streamsize xsputn(const char *s, std::streamsize n) final { std::streamsize capacity = epptr() - pptr(); std::streamsize left = n; @@ -72,7 +72,7 @@ protected: return n; } - int overflow(int c) + int overflow(int c) final { if (traits_type::not_eof(c)) { char str = traits_type::to_char_type(c); -- 2.39.5