1. fix bug in Object::nextIndex*

2. implement ::generateCodeBlockTreeFromASTWalkerPostProcess

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-01-04 15:18:26 +09:00
commit c970d99552
7 changed files with 21 additions and 15 deletions

View file

@ -713,7 +713,7 @@ double Object::nextIndexForward(ExecutionState& state, Object* obj, const double
}
if (index > cur) {
if (ret > index) {
ret = index;
ret = std::min(static_cast<double>(index), ret);
}
}
}
@ -737,9 +737,7 @@ double Object::nextIndexBackward(ExecutionState& state, Object* obj, const doubl
return true;
}
if (index < cur) {
if (ret < index) {
ret = index;
}
ret = std::max(static_cast<double>(index), ret);
}
}
return true;