summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/misc/svxacorr.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 4bba27869aaf..0d8ff52bd688 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2672,10 +2672,7 @@ bool SvxAutocorrWordList::Insert(SvxAutocorrWord *pWord)
if ( maSet.empty() ) // use the hash
{
rtl::OUString aShort( pWord->GetShort() );
- bool bThere = maHash.find( aShort ) != maHash.end();
- if (!bThere)
- maHash.insert( std::pair<rtl::OUString, SvxAutocorrWord *>( aShort, pWord ) );
- return !bThere;
+ return maHash.insert( std::pair<rtl::OUString, SvxAutocorrWord *>( aShort, pWord ) ).second;
}
else
return maSet.insert( pWord ).second;