diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:17 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:17 +0200 |
commit | b654dbfa5f3e4a4d02f72023f7c5895635aa6396 (patch) | |
tree | 8c1dfe7f638c0fc7afc1d08bc2fc0fd0f8646e5e /shared/zstring.h | |
parent | 3.17 (diff) | |
download | FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.gz FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.bz2 FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.zip |
3.18
Diffstat (limited to 'shared/zstring.h')
-rw-r--r-- | shared/zstring.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/zstring.h b/shared/zstring.h index ae77d333..66f961fa 100644 --- a/shared/zstring.h +++ b/shared/zstring.h @@ -78,6 +78,8 @@ public: #endif ::operator delete(ptr); } + + static size_t calcCapacity(size_t length) { return std::max<size_t>(16, length + length / 2); } //exponential growth + min size }; @@ -120,8 +122,6 @@ typedef char Zchar; //"The reason for all the fuss above" (Loki/SmartPtr) typedef Zbase<Zchar, StorageRefCount, AllocatorFreeStoreChecked> Zstring; //for use with file names -//fast replacement for wxString modelling exponential growth -typedef Zbase<wchar_t, StorageRefCount, AllocatorFreeStoreChecked> zxString; //general unicode string |