From: Francesco Chemolli Date: Thu, 19 Feb 2015 14:52:46 +0000 (+0100) Subject: Implemented move ctor counting, removed some experimental commented code X-Git-Tag: merge-candidate-3-v1~258^2~1 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e5469196af0cbf46145de4821ff2d17e718986b3;p=thirdparty%2Fsquid.git Implemented move ctor counting, removed some experimental commented code --- diff --git a/src/SBuf.cc b/src/SBuf.cc index 28f440acb6..fc784574c5 100644 --- a/src/SBuf.cc +++ b/src/SBuf.cc @@ -366,7 +366,6 @@ memcasecmp(const char *b1, const char *b2, SBuf::size_type len) int SBuf::compare(const SBuf &S, const SBufCaseSensitive isCaseSensitive, const size_type n) const { -// if (n != npos && (n > length() || n > S.length())) { if (n != npos) { debugs(24, 8, "length specified. substr and recurse"); return substr(0,n).compare(S.substr(0,n),isCaseSensitive); diff --git a/src/SBuf.h b/src/SBuf.h index f80bdfb136..f065cc20a4 100644 --- a/src/SBuf.h +++ b/src/SBuf.h @@ -137,6 +137,7 @@ public: SBuf(); SBuf(const SBuf &S); SBuf(SBuf&& S) : store_(std::move(S.store_)), off_(S.off_), len_(S.len_) { + ++stats.moves; S.store_=NULL; S.off_=0; S.len_=0; //RefCount supports NULL }