Mod/Sketcher: add missing brackets in conditions

Warning was:
src/Mod/Sketcher/Gui/CommandConstraints.cpp|131 col 99| warning: '&&' within '||' [-Wlogical-op-parentheses]
This commit is contained in:
Alexander Golubev 2015-05-18 07:44:38 +03:00 committed by wmayer
parent 95f0decaa5
commit cd9488daf7
2 changed files with 2 additions and 2 deletions

View File

@ -142,7 +142,7 @@ void openEditDatumDialog(Sketcher::SketchObject* sketch, int ConstrNbr)
double newDatum = newQuant.getValue();
if (Constr->Type == Sketcher::Angle ||
((Constr->Type == Sketcher::DistanceX || Constr->Type == Sketcher::DistanceY) &&
Constr->FirstPos == Sketcher::none || Constr->Second != Sketcher::Constraint::GeoUndef)) {
(Constr->FirstPos == Sketcher::none || Constr->Second != Sketcher::Constraint::GeoUndef))) {
// Permit negative values to flip the sign of the constraint
if (newDatum >= 0) // keep the old sign
newDatum = ((datum >= 0) ? 1 : -1) * std::abs(newDatum);

View File

@ -147,7 +147,7 @@ void EditDatumDialog::exec(bool atCursor)
double newDatum = newQuant.getValue();
if (Constr->Type == Sketcher::Angle ||
((Constr->Type == Sketcher::DistanceX || Constr->Type == Sketcher::DistanceY) &&
Constr->FirstPos == Sketcher::none || Constr->Second != Sketcher::Constraint::GeoUndef)) {
(Constr->FirstPos == Sketcher::none || Constr->Second != Sketcher::Constraint::GeoUndef))) {
// Permit negative values to flip the sign of the constraint
if (newDatum >= 0) // keep the old sign
newDatum = ((datum >= 0) ? 1 : -1) * std::abs(newDatum);