mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-11-29 01:03:45 +00:00
fix loop algorithms
This commit is contained in:
parent
312a89c4a2
commit
6b5addba9f
2 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ namespace sprout {
|
||||||
inline SPROUT_CONSTEXPR T
|
inline SPROUT_CONSTEXPR T
|
||||||
until_loop(T init, Predicate pred, UnaryOperation unary_op) {
|
until_loop(T init, Predicate pred, UnaryOperation unary_op) {
|
||||||
typedef sprout::pair<T, bool> type;
|
typedef sprout::pair<T, bool> type;
|
||||||
return sprout::detail::until_loop_impl(type(init, false), pred, unary_op, 1).second;
|
return sprout::detail::until_loop_impl(type(init, false), pred, unary_op, 1).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace sprout {
|
||||||
inline SPROUT_CONSTEXPR T
|
inline SPROUT_CONSTEXPR T
|
||||||
while_loop(T init, Predicate pred, UnaryOperation unary_op) {
|
while_loop(T init, Predicate pred, UnaryOperation unary_op) {
|
||||||
typedef sprout::pair<T, bool> type;
|
typedef sprout::pair<T, bool> type;
|
||||||
return sprout::detail::while_loop_impl(type(init, false), pred, unary_op, 1).second;
|
return sprout::detail::while_loop_impl(type(init, false), pred, unary_op, 1).first;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue