summaryrefslogtreecommitdiff
path: root/i18nlangtag
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 08:30:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 08:25:51 +0100
commitd4ed6ff5c1d0638dd46d3a2272c5c54b9700551f (patch)
treee6b0fd4a2603001c6eec209c5359f621a64cea17 /i18nlangtag
parenta41f9b3ae91101414a7ba2f651f735bc71f69f81 (diff)
loplugin:makeshared in hwpfilter..i18npool
Change-Id: I2e757043215164df173c89e21cebe2f4c9c05de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87321 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18nlangtag')
-rw-r--r--i18nlangtag/source/languagetag/languagetag.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index ef47e54579bc..36b4a1eddb96 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -611,7 +611,7 @@ LanguageTag::ImplPtr LanguageTagImpl::registerOnTheFly( LanguageType nRegisterID
else
{
SAL_INFO( "i18nlangtag", "LanguageTag::registerOnTheFly: new impl for '" << maBcp47 << "'");
- pImpl.reset( new LanguageTagImpl( *this));
+ pImpl = std::make_shared<LanguageTagImpl>( *this);
rMapBcp47.insert( ::std::make_pair( maBcp47, pImpl));
}
@@ -767,7 +767,7 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
// to inspect such places.
LanguageTag::ImplPtr& rDontKnow = theDontKnow::get();
if (!rDontKnow)
- rDontKnow.reset( new LanguageTagImpl( *this));
+ rDontKnow = std::make_shared<LanguageTagImpl>( *this);
pImpl = rDontKnow;
#if OSL_DEBUG_LEVEL > 0
static size_t nCallsDontKnow = 0;
@@ -853,7 +853,7 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
else
{
SAL_INFO( "i18nlangtag", "LanguageTag::registerImpl: new impl for 0x" << ::std::hex << mnLangID);
- pImpl.reset( new LanguageTagImpl( *this));
+ pImpl = std::make_shared<LanguageTagImpl>( *this);
rMap.insert( ::std::make_pair( mnLangID, pImpl));
// Try round-trip.
if (!pImpl->mbInitializedLocale)
@@ -896,7 +896,7 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
else
{
SAL_INFO( "i18nlangtag", "LanguageTag::registerImpl: new impl for '" << maBcp47 << "'");
- pImpl.reset( new LanguageTagImpl( *this));
+ pImpl = std::make_shared<LanguageTagImpl>( *this);
::std::pair< MapBcp47::iterator, bool > insOrig( rMap.insert( ::std::make_pair( maBcp47, pImpl)));
// If changed after canonicalize() also add the resulting tag to
// the map.
@@ -973,7 +973,7 @@ LanguageTag::ImplPtr LanguageTag::registerImpl() const
else
{
SAL_WARN( "i18nlangtag", "LanguageTag::registerImpl: can't register for 0x" << ::std::hex << mnLangID );
- pImpl.reset( new LanguageTagImpl( *this));
+ pImpl = std::make_shared<LanguageTagImpl>( *this);
}
// If we reach here for mbSystemLocale we didn't have theSystemLocale