]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/StackStringStream: make override method with "final"
authorKefu Chai <kchai@redhat.com>
Mon, 26 Apr 2021 15:36:04 +0000 (23:36 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 2 May 2021 00:16:12 +0000 (08:16 +0800)
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 <kchai@redhat.com>
src/common/StackStringStream.h

index 8bd70fc1a110ad85be632de8ca5d47bc6f08e7ac..3324e7add35381f7c0b53643a14bf60e95b2ef65 100644 (file)
@@ -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);