summaryrefslogtreecommitdiff
path: root/zen/stl_tools.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:01:58 +0200
committerDaniel Wilhelm <shieldwed@outlook.com>2018-05-09 00:01:58 +0200
commit725e6e3c8e52ede0edec0fa15da3f148bb2f7d74 (patch)
tree739061fe661dc0bd1d200b0378365f3f47ff78be /zen/stl_tools.h
parent9.3 (diff)
downloadFreeFileSync-725e6e3c8e52ede0edec0fa15da3f148bb2f7d74.tar.gz
FreeFileSync-725e6e3c8e52ede0edec0fa15da3f148bb2f7d74.tar.bz2
FreeFileSync-725e6e3c8e52ede0edec0fa15da3f148bb2f7d74.zip
9.4
Diffstat (limited to 'zen/stl_tools.h')
-rwxr-xr-xzen/stl_tools.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/zen/stl_tools.h b/zen/stl_tools.h
index b03d7533..2fcecd11 100755
--- a/zen/stl_tools.h
+++ b/zen/stl_tools.h
@@ -39,9 +39,6 @@ void append(std::set<T, LessType, Alloc>& s, const C& c);
template <class KeyType, class ValueType, class LessType, class Alloc, class C>
void append(std::map<KeyType, ValueType, LessType, Alloc>& m, const C& c);
-template <class M, class K, class V>
-V& map_add_or_update(M& map, const K& key, const V& value); //efficient add or update without "default-constructible" requirement (Effective STL, item 24)
-
template <class T, class Alloc>
void removeDuplicates(std::vector<T, Alloc>& v);
@@ -125,20 +122,6 @@ template <class KeyType, class ValueType, class LessType, class Alloc, class C>
void append(std::map<KeyType, ValueType, LessType, Alloc>& m, const C& c) { m.insert(c.begin(), c.end()); }
-template <class M, class K, class V> inline
-V& map_add_or_update(M& map, const K& key, const V& value) //efficient add or update without "default-constructible" requirement (Effective STL, item 24)
-{
- auto it = map.lower_bound(key);
- if (it != map.end() && !(map.key_comp()(key, it->first)))
- {
- it->second = value;
- return it->second;
- }
- else
- return map.insert(it, typename M::value_type(key, value))->second;
-}
-
-
template <class T, class Alloc> inline
void removeDuplicates(std::vector<T, Alloc>& v)
{
bgstack15