From af17010524a21800b595e91631196b6a4f47d7c9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 1 Aug 2013 18:35:13 +0100 Subject: [PATCH] contains: do not check if container is empty --- src/utils.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.hh b/src/utils.hh index ea217b97..4ff1839b 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -180,7 +180,7 @@ auto find_if(Container&& container, T op) -> decltype(container.begin()) template bool contains(Container&& container, const T& value) { - return (not container.empty()) and find(container, value) != container.end(); + return find(container, value) != container.end(); } template