diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-07-21 18:50:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-22 11:13:28 +0200 |
commit | aa2067dda63852b0eb84d5c32497f5a28177bb1c (patch) | |
tree | c55e9293ba60ac588e2b9431905c5ea0d3e48895 /svtools/source/svhtml/parhtml.cxx | |
parent | 7335d912de04eaa279dc805ee0ed5be0fcac5326 (diff) |
elide some makeStringAndClear() calls
Change-Id: Iccdb04df53bc981e2240240daddf15e9e1bb5a16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137310
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/svhtml/parhtml.cxx')
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index d29027449181..0ac10578981c 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -1140,7 +1140,8 @@ HtmlTokenId HTMLParser::GetNextToken_() if( !bDone ) nNextCh = GetNextChar(); } - aToken = sTmpBuffer.makeStringAndClear(); + aToken = sTmpBuffer; + sTmpBuffer.setLength(0); if( !bDone && IsParserWorking() && nCStreamPos ) { rInput.Seek( nCStreamPos ); @@ -1246,7 +1247,8 @@ HtmlTokenId HTMLParser::GetNextToken_() nRet = HtmlTokenId::TEXTTOKEN; break; } - aToken = aTmpBuffer.makeStringAndClear(); + aToken = aTmpBuffer; + aTmpBuffer.setLength(0); if( IsParserWorking() ) { sSaveToken = aToken; @@ -1608,7 +1610,7 @@ HtmlTokenId HTMLParser::FilterPRE( HtmlTokenId nToken ) { using comphelper::string::padToLength; OUStringBuffer aBuf(aToken); - aToken = padToLength(aBuf, nSpaces, ' ').makeStringAndClear(); + aToken = padToLength(aBuf, nSpaces, ' '); } nPre_LinePos += nSpaces; nToken = HtmlTokenId::TEXTTOKEN; |