From 3817965ded6c7ed915e4f9599e18b3e8abdaca44 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 12 May 2022 14:33:06 +0200 Subject: add SvStream::ReadLine(OStringBuffer... to reduce OString allocation and use it where possible Change-Id: I3efc7a642f73661ce606c917c0323ba9948521c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134265 Tested-by: Jenkins Reviewed-by: Noel Grandin --- idl/source/prj/command.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'idl/source') diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx index 15d08d99d39c..0c9436ce313e 100644 --- a/idl/source/prj/command.cxx +++ b/idl/source/prj/command.cxx @@ -136,7 +136,7 @@ static bool ResponseFile( std::vector * pList, int argc, char ** argv if( aStm.GetError() != ERRCODE_NONE ) return false; - OString aStr; + OStringBuffer aStr; while( aStm.ReadLine( aStr ) ) { sal_uInt16 n = 0; @@ -153,7 +153,7 @@ static bool ResponseFile( std::vector * pList, int argc, char ** argv static_cast(aStr[n]) ) ) n++; if( n != nPos ) - pList->push_back( OStringToOUString(aStr.subView(nPos, n - nPos), RTL_TEXTENCODING_ASCII_US) ); + pList->push_back( OStringToOUString(std::string_view(aStr).substr(nPos, n - nPos), RTL_TEXTENCODING_ASCII_US) ); } } } -- cgit