Refactor State::restore_points_on_tri_del(...)
All checks were successful
Run UnitTests / build-and-run-tests (push) Successful in 31s
All checks were successful
Run UnitTests / build-and-run-tests (push) Successful in 31s
This commit is contained in:
parent
852a099930
commit
b8d4521223
1 changed files with 11 additions and 11 deletions
|
@ -669,7 +669,8 @@ void Tri::State::restore_points_on_tri_del(Action::IndexT end) {
|
|||
pointCircle.fillColor = history[end].color;
|
||||
unsigned int currentTriIdx = 1;
|
||||
while(end-- > 0) {
|
||||
if(history[end].type == Action::AT_POINT) {
|
||||
assert(history[end].type == Action::AT_POINT
|
||||
&& "Latest history must be AT_POINT type");
|
||||
assert(history[end].idx == currentTriIdx
|
||||
&& "Last point must be second point");
|
||||
currentTri[currentTriIdx].x = history[end].data.point[0];
|
||||
|
@ -681,7 +682,6 @@ void Tri::State::restore_points_on_tri_del(Action::IndexT end) {
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
assert(!"Unreachable code");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue