diff options
author | Eugene Sandulenko | 2006-06-02 13:00:27 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-06-02 13:00:27 +0000 |
commit | 8c7abdf024f32e566480d2d978a4cd4399435baa (patch) | |
tree | 02c20c8c8231d09624719a7ead45d34491a844d4 /common/str.h | |
parent | b0733e0fc1eec5cfac9fac6c1ea40260257faa0e (diff) | |
download | scummvm-rg350-8c7abdf024f32e566480d2d978a4cd4399435baa.tar.gz scummvm-rg350-8c7abdf024f32e566480d2d978a4cd4399435baa.tar.bz2 scummvm-rg350-8c7abdf024f32e566480d2d978a4cd4399435baa.zip |
Allocate minimum 16 bytes on String(str) call. Reduces 2.500 malloc() calls
on startup
svn-id: r22834
Diffstat (limited to 'common/str.h')
-rw-r--r-- | common/str.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/str.h b/common/str.h index b345000164..1e7fa1577b 100644 --- a/common/str.h +++ b/common/str.h @@ -45,7 +45,7 @@ public: #endif String() : _str(0), _len(0), _capacity(0) { _refCount = new int(1); } - String(const char *str, int len = -1); + String(const char *str, int len = -1, int capacity = 16); String(const String &str); virtual ~String(); |