Add trivial wxVectorContains() helper

This is nicer than using std::find() when only a test for presence is
required.
This commit is contained in:
Vadim Zeitlin
2020-11-16 04:04:12 +01:00
parent b021c3c938
commit 516066939a
3 changed files with 42 additions and 0 deletions

View File

@@ -307,3 +307,13 @@ public:
*/
template<typename T>
void wxVectorSort(wxVector<T>& v);
/**
Returns true if the vector contains the given value.
This is just a trivial wrapper around std::find().
@since 3.1.5
*/
template<typename T>
bool wxVectorContains(const wxVector<T>& v, const T& value);