mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
[algorithm.lower_bound] Change a bit.
This commit is contained in:
parent
3acc1ac301
commit
729c42d081
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@ namespace sprout {
|
||||||
return first == last ? last
|
return first == last ? last
|
||||||
: sprout::next(first) == last ? comp(*first, value) ? last : first
|
: sprout::next(first) == last ? comp(*first, value) ? last : first
|
||||||
: comp(*sprout::next(first, sprout::distance(first, last) / 2), value)
|
: comp(*sprout::next(first, sprout::distance(first, last) / 2), value)
|
||||||
? sprout::lower_bound(sprout::next(first, sprout::distance(first, last) / 2), last, value, comp)
|
? sprout::lower_bound(sprout::next(first, sprout::distance(first, last) / 2 + 1), last, value, comp)
|
||||||
: sprout::lower_bound(first, sprout::next(first, sprout::distance(first, last) / 2), value, comp)
|
: sprout::lower_bound(first, sprout::next(first, sprout::distance(first, last) / 2), value, comp)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ namespace sprout {
|
||||||
lower_bound(ForwardIterator first, ForwardIterator last, T const& value) {
|
lower_bound(ForwardIterator first, ForwardIterator last, T const& value) {
|
||||||
return sprout::lower_bound(
|
return sprout::lower_bound(
|
||||||
first, last, value,
|
first, last, value,
|
||||||
NS_SSCRISK_CEL_OR_SPROUT::less<typename std::iterator_traits<ForwardIterator>::value_type>()
|
NS_SSCRISK_CEL_OR_SPROUT::less<>()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} // namespace sprout
|
} // namespace sprout
|
||||||
|
|
Loading…
Reference in a new issue