From a408f4a7761e76724f552e93a075409a609b94d3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 24 Sep 2008 20:35:31 +0000 Subject: Changed builtin Common::String capacity to 24 (on 32 bit systems), to make sizeof(String) 32; reduces overall memory req by 200k on my system; overall # of mallocs after this + the refcount memory pool change is almost unchanged svn-id: r34644 --- common/str.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/str.h') diff --git a/common/str.h b/common/str.h index 20914c1f1f..772718a087 100644 --- a/common/str.h +++ b/common/str.h @@ -54,7 +54,7 @@ protected: * than 8 makes no sense, since that's the size of member _extern * (on 32 bit machines; 12 bytes on systems with 64bit pointers). */ - static const uint32 _builtinCapacity = 32; + static const uint32 _builtinCapacity = 32 - sizeof(uint32) - sizeof(char*); /** * Length of the string. Stored to avoid having to call strlen -- cgit v1.2.3 From 0d34b772a408771b742cd196b14b6cbb34145d00 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 27 Sep 2008 18:34:24 +0000 Subject: Fixed a nasty bug in SearchManager::addDirectory; made the 'char' constructor of Common::String explicit, to avoid such bugs in the future svn-id: r34660 --- common/str.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/str.h') diff --git a/common/str.h b/common/str.h index 772718a087..c3e773c3e4 100644 --- a/common/str.h +++ b/common/str.h @@ -112,7 +112,7 @@ public: String(const String &str); /** Construct a string consisting of the given character. */ - String(char c); + explicit String(char c); ~String(); -- cgit v1.2.3