summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-14 18:19:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-14 18:19:26 +0200
commit83360372383fdcbab18560a5113c92115b166cd5 (patch)
treef2731a6a09ba425bd2114de95184d60bedb6828a /svl
parent3c2803bdbc598deeaf6efe43870d4f9d61cb2c6a (diff)
tdf#94205: Some remaining new+std::move -> o3tl::make_unique
Change-Id: I6a9a46d37bf09f6b497d591498c40103f4c96f59
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9cfe4cc2e85a..06dc916492fa 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -24,6 +24,7 @@
#include <svl/currencytable.hxx>
#include <comphelper/string.hxx>
+#include <o3tl/make_unique.hxx>
#include <tools/debug.hxx>
#include <unotools/charclass.hxx>
#include <unotools/configmgr.hxx>
@@ -3737,12 +3738,11 @@ void SvNumberFormatter::ImpInitCurrencyTable()
aConfiguredCurrencyAbbrev, eConfiguredCurrencyLanguage );
sal_uInt16 nSecondarySystemCurrencyPosition = 0;
sal_uInt16 nMatchingSystemCurrencyPosition = 0;
- std::unique_ptr<NfCurrencyEntry> pEntry(
- // first entry is SYSTEM
- new NfCurrencyEntry( *pLocaleData, LANGUAGE_SYSTEM ));
+ // First entry is SYSTEM:
theCurrencyTable::get().insert(
- theCurrencyTable::get().begin(), std::move(pEntry));
+ theCurrencyTable::get().begin(),
+ o3tl::make_unique<NfCurrencyEntry>(*pLocaleData, LANGUAGE_SYSTEM));
sal_uInt16 nCurrencyPos = 1;
css::uno::Sequence< css::lang::Locale > xLoc = LocaleDataWrapper::getInstalledLocaleNames();
@@ -3769,6 +3769,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
if ( pCurrencies[nDefault].Default )
break;
}
+ std::unique_ptr<NfCurrencyEntry> pEntry;
if ( nDefault < nCurrencyCount )
{
pEntry.reset(new NfCurrencyEntry(pCurrencies[nDefault], *pLocaleData, eLang));
@@ -3802,10 +3803,10 @@ void SvNumberFormatter::ImpInitCurrencyTable()
{
if (pCurrencies[nCurrency].LegacyOnly)
{
- pEntry.reset(new NfCurrencyEntry(pCurrencies[nCurrency], *pLocaleData, eLang));
rLegacyOnlyCurrencyTable.insert(
rLegacyOnlyCurrencyTable.begin() + nLegacyOnlyCurrencyPos++,
- std::move(pEntry));
+ o3tl::make_unique<NfCurrencyEntry>(
+ pCurrencies[nCurrency], *pLocaleData, eLang));
}
else if ( nCurrency != nDefault )
{