1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 09:21:30 +03:00

contains: do not check if container is empty

This commit is contained in:
Maxime Coste 2013-08-01 18:35:13 +01:00
parent a2577b4180
commit af17010524

View File

@ -180,7 +180,7 @@ auto find_if(Container&& container, T op) -> decltype(container.begin())
template<typename Container, typename T> template<typename Container, typename T>
bool contains(Container&& container, const T& value) bool contains(Container&& container, const T& value)
{ {
return (not container.empty()) and find(container, value) != container.end(); return find(container, value) != container.end();
} }
template<typename T1, typename T2> template<typename T1, typename T2>