Match binary_find.

Thanks Gib.


Former-commit-id: 9faedfc54782c5fbe4b63f1147182da3792a0b87
This commit is contained in:
Henrique Gemignani Passos Lima 2022-12-09 15:00:01 -03:00
parent 6b69dfc5de
commit d2c055d270

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)) { if (lower != end && !cmp(value, *lower)) {
found = true; found = true;
} }
if (found) { return found ? lower : end;
return lower;
} else {
return end;
}
} }
template < typename T, typename Cmp > template < typename T, typename Cmp >