]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: use better name reset for clear method
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 7 Jan 2019 17:46:10 +0000 (09:46 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 15 Jan 2019 14:41:39 +0000 (06:41 -0800)
Reset is more analogous to re-initilization which is the intent.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/common/StackStringStream.h

index 475a23c4fd939ec6a00c7674ee0a1fa456eef852..522abc0749a944a1d106afab5b1fafd76d5dcfba 100644 (file)
@@ -99,8 +99,8 @@ public:
   StackStringStream& operator=(StackStringStream&& o) = delete;
   ~StackStringStream() override = default;
 
-  void clear() {
-    basic_ostream<char>::clear();
+  void reset() {
+    clear(); /* reset state flags */
     ssb.clear();
   }
 
@@ -129,7 +129,7 @@ public:
     } else {
       osp = std::move(cache.c.back());
       cache.c.pop_back();
-      osp->clear();
+      osp->reset();
     }
   }
   CachedStackStringStream(const CachedStackStringStream&) = delete;