summaryrefslogtreecommitdiff
path: root/sc/source/core/data/dpcache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/dpcache.cxx')
-rw-r--r--sc/source/core/data/dpcache.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index de62e25f5d91..6222ab6ec6b4 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -120,13 +120,7 @@ private:
rtl_uString* internString( ScDPCache::StringSetType& rPool, const OUString& rStr )
{
- ScDPCache::StringSetType::iterator it = rPool.find(rStr);
- if (it != rPool.end())
- // In the pool.
- return (*it).pData;
-
- std::pair<ScDPCache::StringSetType::iterator, bool> r = rPool.insert(rStr);
- return r.second ? (*r.first).pData : nullptr;
+ return rPool.insert(rStr).first->pData;
}
OUString createLabelString( const ScDocument* pDoc, SCCOL nCol, const ScRefCellValue& rCell )