summaryrefslogtreecommitdiff
path: root/unotools/source/config/fontcfg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unotools/source/config/fontcfg.cxx')
-rw-r--r--unotools/source/config/fontcfg.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 114e2dc37352..ecb47f59dae8 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -863,11 +863,9 @@ void FontSubstConfiguration::fillSubstVector( const css::uno::Reference< XNameAc
OUString aSubst( pLine->getToken( 0, ';', nIndex ) );
if( !aSubst.isEmpty() )
{
- UniqueSubstHash::iterator aEntry = maSubstHash.find( aSubst );
- if (aEntry != maSubstHash.end())
- aSubst = *aEntry;
- else
- maSubstHash.insert( aSubst );
+ auto itPair = maSubstHash.insert( aSubst );
+ if (!itPair.second)
+ aSubst = *itPair.first;
rSubstVector.push_back( aSubst );
}
}