From: Kefu Chai Date: Mon, 26 Apr 2021 15:36:04 +0000 (+0800) Subject: common/StackStringStream: make override method with "final" X-Git-Tag: v17.1.0~2082^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aeb1ef57f0271e3e7b3f2a5ffe3333ee8a539e84;p=ceph.git 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 --- diff --git a/src/common/StackStringStream.h b/src/common/StackStringStream.h index 8bd70fc1a110..3324e7add353 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);