summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-12 14:33:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-13 11:11:27 +0200
commit3817965ded6c7ed915e4f9599e18b3e8abdaca44 (patch)
treee112927919e8b7c9ce6c1e233ff6fce05f189784 /connectivity
parent8ad920befe1290c40ef762e8d7d9797b1924f5d2 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 39475e715e5d..aa874c6120f2 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -252,7 +252,7 @@ namespace connectivity
std::unique_ptr<SvStream> pStream( ::utl::UcbStreamHelper::CreateStream(xStream) );
if (pStream)
{
- OString sLine;
+ OStringBuffer sLine;
OString sVersionString;
while ( pStream->ReadLine(sLine) )
{
@@ -260,7 +260,7 @@ namespace connectivity
continue;
sal_Int32 nIdx {0};
const std::string_view sIniKey = o3tl::getToken(sLine, 0, '=', nIdx);
- const OString sValue = sLine.getToken(0, '=', nIdx);
+ const OString sValue(o3tl::getToken(sLine, 0, '=', nIdx));
if( sIniKey == "hsqldb.compatible_version" )
{
sVersionString = sValue;