mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-06-30 23:43:28 +00:00
Match rstl::lower_bound
Thanks Antidote Former-commit-id: 8dc42490e540c00522e85f9cc06b3aae8ea98a6b
This commit is contained in:
parent
9e408418a1
commit
28e9710502
@ -100,8 +100,8 @@ It lower_bound(It start, It end, const T& value, Cmp cmp) {
|
|||||||
int dist = distance(start, end);
|
int dist = distance(start, end);
|
||||||
It it = start;
|
It it = start;
|
||||||
while (dist > 0) {
|
while (dist > 0) {
|
||||||
it = start;
|
|
||||||
int halfDist = dist / 2;
|
int halfDist = dist / 2;
|
||||||
|
it = start;
|
||||||
advance(it, halfDist);
|
advance(it, halfDist);
|
||||||
if (cmp(*it, value)) {
|
if (cmp(*it, value)) {
|
||||||
start = it;
|
start = it;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user