summaryrefslogtreecommitdiff
path: root/idl/source/prj
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2019-10-17 20:33:50 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-21 08:36:01 +0200
commit0f874472c672175135520101837ff0c9d4701d7f (patch)
treefa6a504bdfc7d5d838caed7cfb87793321797290 /idl/source/prj
parent9112c18524c9f5e67d6cbb282586a439e3020cdb (diff)
size some stringbuffer to prevent re-alloc
found by the simple expidient of putting asserts in the resize routine. Where an explicit const size is used, I started with 32 and kept doubling until that site did not need resizing anymore. Change-Id: I998787edc940d0a3ba23b5ac37131ab9ecd300f4 Reviewed-on: https://gerrit.libreoffice.org/81138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'idl/source/prj')
-rw-r--r--idl/source/prj/database.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index f76b38687915..b63205a0911b 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -221,7 +221,7 @@ bool SvIdlDataBase::ReadIdFile( const OString& rOFileName )
else if( rTok.Is( SvHash_include() ) )
{
rTok = aTokStm.GetToken_Next();
- OStringBuffer aNameBuf;
+ OStringBuffer aNameBuf(128);
if( rTok.IsString() )
aNameBuf.append(rTok.GetString());
else if( rTok.IsChar() && rTok.GetChar() == '<' )