Match binary_find.

Thanks Gib.
This commit is contained in:
Henrique Gemignani Passos Lima 2022-12-09 15:00:01 -03:00
parent 572777596d
commit 9faedfc547
1 changed files with 1 additions and 5 deletions

View File

@ -121,11 +121,7 @@ inline It binary_find(It start, It end, const T& value, Cmp cmp) {
if (lower != end && !cmp(value, *lower)) {
found = true;
}
if (found) {
return lower;
} else {
return end;
}
return found ? lower : end;
}
template < typename T, typename Cmp >