[Sketch] remove unnecessary Boolean comparisons

This commit is contained in:
Uwe
2022-06-19 18:35:52 +02:00
parent f4891488d3
commit 68a499574a
6 changed files with 17 additions and 17 deletions

View File

@@ -141,7 +141,7 @@ void removeRedundantHorizontalVertical(Sketcher::SketchObject* psketch,
axis = false;
for(std::vector<AutoConstraint>::const_iterator it = sug.begin(); it!=sug.end(); ++it) {
if( (*it).Type == Sketcher::Coincident && ext == false) {
if( (*it).Type == Sketcher::Coincident && !ext) {
const std::map<int, Sketcher::PointPos> coincidents = psketch->getAllCoincidentPoints((*it).GeoId, (*it).PosId);
if(!coincidents.empty()) {
@@ -162,7 +162,7 @@ void removeRedundantHorizontalVertical(Sketcher::SketchObject* psketch,
orig = ((*it).GeoId == -1 && (*it).PosId == Sketcher::PointPos::start);
}
}
else if( (*it).Type == Sketcher::PointOnObject && axis == false) {
else if( (*it).Type == Sketcher::PointOnObject && !axis) {
axis = (((*it).GeoId == -1 && (*it).PosId == Sketcher::PointPos::none) || ((*it).GeoId == -2 && (*it).PosId == Sketcher::PointPos::none));
}