summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 11:36:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 13:51:29 +0200
commitdb17a874af37350b3270932175854ee674447bc1 (patch)
treefecc983fb75d3a4072cc7bd344fc824d548deb0d /stoc
parentdd8a400bbbb1b8d5592a870f2036a4df3d005a7d (diff)
convert std::map::insert to std::map::emplace II
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331 Reviewed-on: https://gerrit.libreoffice.org/41019 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/inspect/introspection.cxx3
-rw-r--r--stoc/source/security/lru_cache.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index 65dc5d026710..063e868a1604 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1519,8 +1519,7 @@ public:
}
map_.erase(del);
}
- bool ins = map_.insert(typename Map::value_type(key, Data(access)))
- .second;
+ bool ins = map_.emplace(key, Data(access)).second;
assert(ins); (void)ins;
}
diff --git a/stoc/source/security/lru_cache.h b/stoc/source/security/lru_cache.h
index 6677a95b843f..28c34fec9eda 100644
--- a/stoc/source/security/lru_cache.h
+++ b/stoc/source/security/lru_cache.h
@@ -193,7 +193,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set(
m_key2element.erase( entry->m_key );
entry->m_key = key;
::std::pair< typename t_key2element::iterator, bool > insertion(
- m_key2element.insert( typename t_key2element::value_type( key, entry ) ) );
+ m_key2element.emplace( key, entry ) );
OSL_ENSURE( insertion.second, "### inserting new cache entry failed?!" );
}
else