From fbff7af0a1a31e82c3a3eb6dac77d5a48ef3371d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 29 Apr 2022 20:52:46 +0200 Subject: split comphelper::string::strip functions into String and view version which is more obvious, from the perspective of the caller, and lets us avoid creating a new String if nothing needs to be stripped Change-Id: I66a980eaf4aa818251bec49bdb16c2dddb0745e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133657 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/treelist/imap2.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx index ef78e86bb42d..fd308afe0608 100644 --- a/vcl/source/treelist/imap2.cxx +++ b/vcl/source/treelist/imap2.cxx @@ -243,7 +243,7 @@ void ImageMap::ImpReadCERN( SvStream& rIStm ) void ImageMap::ImpReadCERNLine( std::string_view rLine ) { - OString aStr = comphelper::string::stripStart(rLine, ' '); + OString aStr( comphelper::string::stripStart(rLine, ' ') ); aStr = comphelper::string::stripStart(aStr, '\t'); aStr = aStr.replaceAll(";", ""); aStr = aStr.toAsciiLowerCase(); @@ -376,7 +376,7 @@ void ImageMap::ImpReadNCSA( SvStream& rIStm ) void ImageMap::ImpReadNCSALine( std::string_view rLine ) { - OString aStr = comphelper::string::stripStart(rLine, ' '); + OString aStr( comphelper::string::stripStart(rLine, ' ') ); aStr = comphelper::string::stripStart(aStr, '\t'); aStr = aStr.replaceAll(";", ""); aStr = aStr.toAsciiLowerCase(); -- cgit