diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2019-10-17 20:33:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-26 12:38:33 +0200 |
commit | e276c812648bf511d6c4813d6fd82a00391cfdac (patch) | |
tree | adbf24f41bef128a081cc1cc117c8023a3eed65d /tools/source/debug/debug.cxx | |
parent | d04f044f05b4d13c3c6ea3f33fddd9c05a0ab3ad (diff) |
size some stringbuffer to prevent re-alloc
I started with 32 and kept doubling the size until the site
did not need re-alloc, but clamped it at 512 (e.g. in emfio/).
Change-Id: Ib7caf35a1b7e42b0e4ed8aa812493449e3eefc8f
Reviewed-on: https://gerrit.libreoffice.org/81540
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source/debug/debug.cxx')
-rw-r--r-- | tools/source/debug/debug.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index 4d4a817a7f40..3ab901c1aee9 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -406,7 +406,8 @@ OString exceptionToString(const css::uno::Any & caught) void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunction, const char* fileAndLineNo, const char* area, const char* explanatory) { - OStringBuffer sMessage( "DBG_UNHANDLED_EXCEPTION in " ); + OStringBuffer sMessage( 512 ); + sMessage.append( "DBG_UNHANDLED_EXCEPTION in " ); sMessage.append(currentFunction); if (explanatory) { |