PVS: V728 An excessive check can be simplified
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user