summaryrefslogtreecommitdiff
path: root/zen/stl_tools.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:54:15 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:54:15 +0200
commit7293645a25d10dc4d6b874d821f9ad802b30d3ed (patch)
tree48b058b2bddd4feb2318fc5b56fd580efca64b87 /zen/stl_tools.h
parent6.12 (diff)
downloadFreeFileSync-7293645a25d10dc4d6b874d821f9ad802b30d3ed.tar.gz
FreeFileSync-7293645a25d10dc4d6b874d821f9ad802b30d3ed.tar.bz2
FreeFileSync-7293645a25d10dc4d6b874d821f9ad802b30d3ed.zip
6.13
Diffstat (limited to 'zen/stl_tools.h')
-rw-r--r--zen/stl_tools.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/zen/stl_tools.h b/zen/stl_tools.h
index a8f2a9b5..d00fc732 100644
--- a/zen/stl_tools.h
+++ b/zen/stl_tools.h
@@ -19,7 +19,10 @@ template <class V, class Predicate>
void vector_remove_if(V& vec, Predicate p);
template <class V, class W>
-void vector_append(V& vec, W& vec2);
+void vector_append(V& vec, const W& vec2);
+
+template <class V, class W>
+void set_append(V& s, const W& s2);
template <class S, class Predicate>
void set_remove_if(S& set, Predicate p);
@@ -68,12 +71,19 @@ void vector_remove_if(V& vec, Predicate p)
template <class V, class W> inline
-void vector_append(V& vec, W& vec2)
+void vector_append(V& vec, const W& vec2)
{
vec.insert(vec.end(), vec2.begin(), vec2.end());
}
+template <class V, class W> inline
+void set_append(V& s, const W& s2)
+{
+ s.insert(s2.begin(), s2.end());
+}
+
+
template <class S, class Predicate> inline
void set_remove_if(S& set, Predicate p)
{
bgstack15