From dc509053308e753e66b6822c4fc3ada682353eec Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Sun, 17 May 2015 18:16:01 +0300 Subject: [PATCH] salomesmesh: fix broken conditions Warnings was: src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp|617 col 19| warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] || bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ); || ^ ~~ src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp|2165 col 31| warning: '&&' within '||' [-Wlogical-op-parentheses] || if ( !aMinStr.IsEmpty() && !aMinStr.IsIntegerValue() || --- src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp | 2 +- src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp b/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp index 742dbbf8f2..0362bed52f 100644 --- a/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp +++ b/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp @@ -3291,4 +3291,4 @@ std::vector::reference TSequenceOfXYZ::operator()(size_type n) std::vector::const_reference TSequenceOfXYZ::operator()(size_type n) const { return std::vector::operator[](n-1); -} \ No newline at end of file +} diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp index b4e998c2e1..e68056e182 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp @@ -527,7 +527,7 @@ SMESH_Hypothesis::Hypothesis_Status // shape - bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ); + bool isAlgo = ( anHyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO ); int event = isAlgo ? SMESH_subMesh::ADD_ALGO : SMESH_subMesh::ADD_HYP; SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp); @@ -614,7 +614,7 @@ SMESH_Hypothesis::Hypothesis_Status // shape - bool isAlgo = ( !anHyp->GetType() == SMESHDS_Hypothesis::PARAM_ALGO ); + bool isAlgo = ( anHyp->GetType() != SMESHDS_Hypothesis::PARAM_ALGO ); int event = isAlgo ? SMESH_subMesh::REMOVE_ALGO : SMESH_subMesh::REMOVE_HYP; SMESH_Hypothesis::Hypothesis_Status ret = subMesh->AlgoStateEngine(event, anHyp);