summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-09-11 10:59:28 +0200
committerTor Egge <Tor.Egge@broadpark.no>2020-09-11 11:00:03 +0200
commit2029188fd39bc4a8626d576049a62f5c8a9f2007 (patch)
treed26de65192da514fe0c19c6cde327170de40ff44
parentf99747530354a544cad53de866620a5fd1876763 (diff)
Correct allocated memory accounting for vespalib::string.
-rw-r--r--vespalib/src/vespa/vespalib/stllike/string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/string.h b/vespalib/src/vespa/vespalib/stllike/string.h
index 121a243d403..d85a01b8d52 100644
--- a/vespalib/src/vespa/vespalib/stllike/string.h
+++ b/vespalib/src/vespa/vespalib/stllike/string.h
@@ -530,7 +530,7 @@ public:
}
size_t count_allocated_memory() const {
- return sizeof(small_string) + isAllocated() ? _bufferSize : 0;
+ return sizeof(small_string) + (isAllocated() ? _bufferSize : 0);
}
size_t count_used_memory() const {
return sizeof(small_string) - StackSize + size();