From b654dbfa5f3e4a4d02f72023f7c5895635aa6396 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 18 Apr 2014 17:12:17 +0200 Subject: 3.18 --- shared/zstring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared/zstring.h') 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(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 Zstring; //for use with file names -//fast replacement for wxString modelling exponential growth -typedef Zbase zxString; //general unicode string -- cgit