From 4583911575edf98ccd5b15af8eafa6a3a7b64034 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 21 Jun 2019 12:14:08 +0200 Subject: improve loplugin:simplifyconstruct Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin --- l10ntools/source/po.cxx | 4 ++-- l10ntools/source/propmerge.cxx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'l10ntools/source') diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index f8749ace650d..c317f5ba170c 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -174,7 +174,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream) } while(!rIFStream.eof()) { - OString sLine = OString(sTemp.data(),sTemp.length()); + OString sLine(sTemp.data(),sTemp.length()); if (sLine.startsWith("#. ")) { if( !m_sExtractCom.isEmpty() ) @@ -580,7 +580,7 @@ void PoIfstream::open( const OString& rFileName, OString& rPoHeader ) while( !sTemp.empty() && !m_aInPut.eof() ) { std::getline(m_aInPut,sTemp); - OString sLine = OString(sTemp.data(),sTemp.length()); + OString sLine(sTemp.data(),sTemp.length()); if (sLine.startsWith("\"PO-Revision-Date")) rPoHeader += "PO-Revision-Date: " + lcl_GetTime() + "\n"; else if (sLine.startsWith("\"X-Generator")) diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx index b87c64c994f7..42945aee316d 100644 --- a/l10ntools/source/propmerge.cxx +++ b/l10ntools/source/propmerge.cxx @@ -51,8 +51,7 @@ namespace const OString sHex = sResult.copy( nIndex + 2, 4 ); const sal_Unicode cDec = static_cast( strtol( sHex.getStr(), nullptr, 16 ) ); - const OString sNewChar = - OString( &cDec, 1, RTL_TEXTENCODING_UTF8 ); + const OString sNewChar( &cDec, 1, RTL_TEXTENCODING_UTF8 ); sResult = sResult.replaceAll( "\\u" + sHex, sNewChar ); nIndex = lcl_IndexOfUnicode( sResult, nIndex ); } -- cgit v1.2.3