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:
parent
a2577b4180
commit
af17010524
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user