From cd9488daf7c8d56ca5d4843078167de3e1394d07 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Mon, 18 May 2015 07:44:38 +0300 Subject: [PATCH] Mod/Sketcher: add missing brackets in conditions Warning was: src/Mod/Sketcher/Gui/CommandConstraints.cpp|131 col 99| warning: '&&' within '||' [-Wlogical-op-parentheses] --- src/Mod/Sketcher/Gui/CommandConstraints.cpp | 2 +- src/Mod/Sketcher/Gui/EditDatumDialog.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index bc444205e..8b1159116 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -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); diff --git a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp index 6a64589d1..ae53f487f 100644 --- a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp +++ b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp @@ -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);