]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Implemented move ctor counting, removed some experimental commented code
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 19 Feb 2015 14:52:46 +0000 (15:52 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 19 Feb 2015 14:52:46 +0000 (15:52 +0100)
src/SBuf.cc
src/SBuf.h

index 28f440acb68f31a5837e70e8e55b390a472bb18e..fc784574c5bc0a5328d2fc5cc02dc1cab2588402 100644 (file)
@@ -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);
index f80bdfb1361323347316031e57352839c89ac4f3..f065cc20a49c5ea23fdc07c5b8a6d1b225f75907 100644 (file)
@@ -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
     }