[Sketch] remove unnecessary Boolean comparisons
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user