From f13c6ad5f020a196a0e3aa6f28bda3dc185d465b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 14 Oct 2019 14:27:57 +0200 Subject: new loplugin:bufferadd look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin --- stoc/source/servicemanager/servicemanager.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'stoc') diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 264285d75174..d1930096ffe8 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -1290,10 +1290,8 @@ Reference ORegistryServiceManager::loadWithImplementationName( Sequence ORegistryServiceManager::getFromServiceName( const OUString& serviceName ) const { - OUStringBuffer buf; - buf.append( "/SERVICES/" ); - buf.append( serviceName ); - return retrieveAsciiValueList( m_xRegistry, buf.makeStringAndClear() ); + OUString buf = "/SERVICES/" + serviceName; + return retrieveAsciiValueList( m_xRegistry, buf ); } /** -- cgit