From e276c812648bf511d6c4813d6fd82a00391cfdac Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 17 Oct 2019 20:33:50 +0200 Subject: 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 --- connectivity/source/drivers/hsqldb/HDriver.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 1a03f16707d3..de76ecbba29d 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -142,12 +142,12 @@ namespace connectivity { OUString lcl_getPermittedJavaMethods_nothrow( const Reference< XComponentContext >& _rxContext ) { - OUStringBuffer aConfigPath; - aConfigPath.append( "/org.openoffice.Office.DataAccess/DriverSettings/" ); - aConfigPath.append ( ODriverDelegator::getImplementationName_Static() ); - aConfigPath.append( "/PermittedJavaMethods" ); + OUString aConfigPath = + "/org.openoffice.Office.DataAccess/DriverSettings/" + + ODriverDelegator::getImplementationName_Static() + + "/PermittedJavaMethods"; ::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithComponentContext( - _rxContext, aConfigPath.makeStringAndClear() ) ); + _rxContext, aConfigPath ) ); OUStringBuffer aPermittedMethods; const Sequence< OUString > aNodeNames( aConfig.getNodeNames() ); -- cgit