From f39f94d27bdd6fd0e45b3b4245c06f6acb98e6fe Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 4 Nov 2016 16:05:07 -0600 Subject: [PATCH] Do not hide an already constant SBuf::id or expose its internals. --- src/sbuf/SBuf.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sbuf/SBuf.h b/src/sbuf/SBuf.h index cda0f8bfeb..784d1bff70 100644 --- a/src/sbuf/SBuf.h +++ b/src/sbuf/SBuf.h @@ -125,9 +125,6 @@ public: ~SBuf(); - /// retrieve the SBuf ID number - unsigned int getId() const { return id.value; } - /** Explicit assignment. * * Current SBuf will share backing store with the assigned one. @@ -613,6 +610,11 @@ public: // TODO: possibly implement erase() similar to std::string's erase // TODO: possibly implement a replace() call + + /// SBuf object identifier meant for test cases and debugging. + /// Does not change when object does, including during assignment. + const InstanceId id; + private: /** @@ -641,9 +643,6 @@ private: size_type len_; ///< number of our content bytes in shared store_ static SBufStats stats; ///< class-wide statistics - /// SBuf object identifier; does not change when contents do, - /// including during assignment - const InstanceId id; /** obtain prototype store * -- 2.47.2