aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/stl_util.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-27 20:21:14 +0000
committerlloyd <[email protected]>2011-12-27 20:21:14 +0000
commitfbe23e197b5c80b162234aa1cf5723037b22bdc2 (patch)
tree8c40c158161c420282ac44840ccee73ab62c6554 /src/utils/stl_util.h
parent8c2ab53dfd502d7019468bf24ad8e223531df8b4 (diff)
Force resumed session to use previous ciphersuite, etc
Diffstat (limited to 'src/utils/stl_util.h')
-rw-r--r--src/utils/stl_util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/utils/stl_util.h b/src/utils/stl_util.h
index 0e0617d5b..9ae5c5f7a 100644
--- a/src/utils/stl_util.h
+++ b/src/utils/stl_util.h
@@ -84,6 +84,19 @@ void multimap_insert(std::multimap<K, V>& multimap,
#endif
}
+/**
+* Existence check for values
+*/
+template<typename T>
+bool value_exists(const std::vector<T>& vec,
+ const T& val)
+ {
+ for(size_t i = 0; i != vec.size(); ++i)
+ if(vec[i] == val)
+ return true;
+ return false;
+ }
+
}
#endif