LGTM: [skip ci] fix: Empty branch of conditional

An empty block after a conditional can be a sign of an omission and can decrease maintainability of the code.
Such blocks should contain an explanatory comment to aid future maintainers.
This commit is contained in:
wmayer
2020-07-26 15:49:14 +02:00
parent 41380359a8
commit e9ce75d544
11 changed files with 36 additions and 18 deletions

View File

@@ -2572,15 +2572,18 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
solve();
return 0;
} else
} else {
return -1;
}
} else if (theta1 < 0.001*arcLength) { // drop the second intersection point
std::swap(GeoId1,GeoId2);
std::swap(point1,point2);
} else if (theta2 > 0.999*arcLength) {
// Do nothing here
}
else
else {
return -1;
}
}
if (GeoId1 >= 0) {
@@ -2749,14 +2752,17 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
solve();
return 0;
} else
} else {
return -1;
}
} else if (theta1 < 0.001*arcLength) { // drop the second intersection point
std::swap(GeoId1,GeoId2);
std::swap(point1,point2);
} else if (theta2 > 0.999*arcLength) {
} else
// Do nothing here
} else {
return -1;
}
}
if (GeoId1 >= 0) {
@@ -2927,14 +2933,17 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point)
delete newConstr;
return 0;
} else
} else {
return -1;
}
} else if (theta1 < 0.001*arcLength) { // drop the second intersection point
std::swap(GeoId1,GeoId2);
std::swap(point1,point2);
} else if (theta2 > 0.999*arcLength) {
} else
// Do nothing here
} else {
return -1;
}
}
if (GeoId1 >= 0) {