summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-08-15 09:13:59 +0300
committerTor Lillqvist <tml@collabora.com>2017-08-15 10:06:08 +0300
commit7172a7e4a64a67d43d16c2fbdbe9015fb5bf5a0c (patch)
treecdb655f09b6561554ec7c3ce92217622f7d0b97e /sc
parentb051f4baa9f25e5d00fca941162b4515c76331ec (diff)
tdf#96099: Get rid of one more pointless typedef
Change-Id: If50b022cabb0a94297cdb13c58f80884c33892d3
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/lookupcache.hxx2
-rw-r--r--sc/source/core/data/documen2.cxx10
2 files changed, 5 insertions, 7 deletions
diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx
index ef9d1521fad1..0997f6542811 100644
--- a/sc/inc/lookupcache.hxx
+++ b/sc/inc/lookupcache.hxx
@@ -191,8 +191,6 @@ private:
};
-typedef std::unordered_map< ScRange, ScLookupCache*, ScLookupCache::Hash > ScLookupCacheMap;
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 3e2de5cb6d23..ac44da5278d2 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -111,7 +111,7 @@ using namespace com::sun::star;
// dtor plus helpers are convenient.
struct ScLookupCacheMapImpl
{
- ScLookupCacheMap aCacheMap;
+ std::unordered_map< ScRange, ScLookupCache*, ScLookupCache::Hash > aCacheMap;
~ScLookupCacheMapImpl()
{
freeCaches();
@@ -120,13 +120,13 @@ struct ScLookupCacheMapImpl
{
freeCaches();
// free mapping
- ScLookupCacheMap aTmp;
+ std::unordered_map< ScRange, ScLookupCache*, ScLookupCache::Hash > aTmp;
aCacheMap.swap( aTmp);
}
private:
void freeCaches()
{
- for (ScLookupCacheMap::iterator it( aCacheMap.begin()); it != aCacheMap.end(); ++it)
+ for (auto it( aCacheMap.begin()); it != aCacheMap.end(); ++it)
delete (*it).second;
}
};
@@ -1232,7 +1232,7 @@ ScLookupCache & ScDocument::GetLookupCache( const ScRange & rRange )
ScLookupCache* pCache = nullptr;
if (!pLookupCacheMapImpl)
pLookupCacheMapImpl = new ScLookupCacheMapImpl;
- ScLookupCacheMap::iterator it( pLookupCacheMapImpl->aCacheMap.find( rRange));
+ auto it( pLookupCacheMapImpl->aCacheMap.find( rRange));
if (it == pLookupCacheMapImpl->aCacheMap.end())
{
pCache = new ScLookupCache( this, rRange);
@@ -1256,7 +1256,7 @@ void ScDocument::AddLookupCache( ScLookupCache & rCache )
void ScDocument::RemoveLookupCache( ScLookupCache & rCache )
{
- ScLookupCacheMap::iterator it( pLookupCacheMapImpl->aCacheMap.find(
+ auto it( pLookupCacheMapImpl->aCacheMap.find(
rCache.getRange()));
if (it == pLookupCacheMapImpl->aCacheMap.end())
{