PVS: V728 An excessive check can be simplified

This commit is contained in:
wmayer
2019-03-13 13:49:04 +01:00
parent 93f0d1bec9
commit 5f52bd7b46
2 changed files with 9 additions and 9 deletions

View File

@@ -86,7 +86,7 @@ void ConstraintPulley::onChanged(const App::Property* prop)
if (neg)
force *= -1.0;
if ((IsDriven.getValue() && neg) || (!IsDriven.getValue() && !neg)) {
if (IsDriven.getValue() == neg) {
BeltForce1.setValue(force + TensionForce.getValue());
BeltForce2.setValue(TensionForce.getValue());
} else {

View File

@@ -4726,20 +4726,20 @@ int SketchObject::deleteUnusedInternalGeometry(int GeoId, bool delgeoid)
}
}
if ( (f && !s) || (!f && s) ) { // the equality constraint constraints a pole but it is not interpole
if (f != s) { // the equality constraint constraints a pole but it is not interpole
(*ita)++;
}
}
// ignore radiuses and diameters
else if (((*itc)->Type!=Sketcher::Radius && (*itc)->Type!=Sketcher::Diameter) && ( (*itc)->Second == (*it) || (*itc)->First == (*it) || (*itc)->Third == (*it)) )
// ignore radii and diameters
else if (((*itc)->Type!=Sketcher::Radius && (*itc)->Type!=Sketcher::Diameter) && ( (*itc)->Second == (*it) || (*itc)->First == (*it) || (*itc)->Third == (*it)) ) {
(*ita)++;
}
}
}
if ( (*ita) < 2 ) { // IA
delgeometries.push_back((*it));
}
if ( (*ita) < 2 ) { // IA
delgeometries.push_back((*it));
}
}
}