summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-27 19:53:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-28 09:44:57 +0200
commit164fecadfde2569cb5324017d9bf22e2963008b3 (patch)
treef304a20cc66f46d593c91b5979a57833c80f1246 /l10ntools
parent726d0a2d54da3e97de242c2c10be3afd2aedf943 (diff)
no need to allocate these on the heap
Change-Id: Ic1a1577ed837d3fa2b7b99474f4cee30300628f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116290 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/helpex.cxx4
-rw-r--r--l10ntools/source/helpmerge.cxx6
-rw-r--r--l10ntools/source/lngmerge.cxx6
3 files changed, 8 insertions, 8 deletions
diff --git a/l10ntools/source/helpex.cxx b/l10ntools/source/helpex.cxx
index b5f622b5c6ea..c81fce12ca74 100644
--- a/l10ntools/source/helpex.cxx
+++ b/l10ntools/source/helpex.cxx
@@ -120,11 +120,11 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
else
{
HelpParser aParser( aArgs.m_sInputFile );
- std::unique_ptr<XMLFile> xmlfile(new XMLFile( OString('0') ));
+ XMLFile xmlfile( OString('0') );
hasNoError =
HelpParser::CreatePO(
aArgs.m_sOutputFile, aArgs.m_sInputFile,
- xmlfile.get(), "help" );
+ &xmlfile, "help" );
}
}
catch (std::exception& e)
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index 8fed8ffcb452..460acb50b253 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -148,13 +148,13 @@ bool HelpParser::Merge( const OString &rDestinationFile,
//TODO: explicit BOM handling?
- std::unique_ptr<XMLFile> xmlfile(new XMLFile( OString('0') ));
- if (!aParser.Execute( sHelpFile, xmlfile.get()))
+ XMLFile xmlfile( OString('0') );
+ if (!aParser.Execute( sHelpFile, &xmlfile))
{
SAL_WARN("l10ntools", "could not parse " << sHelpFile);
return false;
}
- MergeSingleFile( xmlfile.get() , pMergeDataFile , rLanguage , rDestinationFile );
+ MergeSingleFile( &xmlfile , pMergeDataFile , rLanguage , rDestinationFile );
return true;
}
diff --git a/l10ntools/source/lngmerge.cxx b/l10ntools/source/lngmerge.cxx
index f0cdaa3ffb25..33794a377c2b 100644
--- a/l10ntools/source/lngmerge.cxx
+++ b/l10ntools/source/lngmerge.cxx
@@ -168,9 +168,9 @@ void LngParser::Merge(
OString sID( sGroup );
std::size_t nLastLangPos = 0;
- std::unique_ptr<ResData> pResData( new ResData( sID, sSource ) );
- pResData->sResTyp = "LngText";
- MergeEntrys *pEntrys = aMergeDataFile.GetMergeEntrys( pResData.get() );
+ ResData aResData( sID, sSource );
+ aResData.sResTyp = "LngText";
+ MergeEntrys *pEntrys = aMergeDataFile.GetMergeEntrys( &aResData );
// read languages
bGroup = false;