Match binary_find.

Thanks Gib.


Former-commit-id: 9faedfc547
This commit is contained in:
Henrique Gemignani Passos Lima 2022-12-09 15:00:01 -03:00
parent 6b69dfc5de
commit d2c055d270
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)) { 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 >