salomesmesh: fix tests in conditions

Lots of warnings like:
src/3rdParty/salomesmesh/src/SMESHDS/SMESHDS_Command.cpp|57 col 6| warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
||         if (!myType == SMESHDS_AddNode)
||

Most of them resulted in conditions being always false.
This commit is contained in:
Alexander Golubev 2015-05-17 17:33:29 +03:00 committed by wmayer
parent f5cd28fc53
commit 5aa4679847

View File

@ -54,7 +54,7 @@ SMESHDS_Command::~SMESHDS_Command()
//=======================================================================
void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
{
if (!myType == SMESHDS_AddNode)
if (myType != SMESHDS_AddNode)
{
MESSAGE("SMESHDS_Command::AddNode : Bad Type");
return;
@ -72,7 +72,7 @@ void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
//=======================================================================
void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z)
{
if (!myType == SMESHDS_MoveNode)
if (myType != SMESHDS_MoveNode)
{
MESSAGE("SMESHDS_Command::MoveNode : Bad Type");
return;
@ -90,7 +90,7 @@ void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z)
//=======================================================================
void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
{
if (!myType == SMESHDS_AddEdge)
if (myType != SMESHDS_AddEdge)
{
MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
return;
@ -108,7 +108,7 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
void SMESHDS_Command::AddFace(int NewFaceID,
int idnode1, int idnode2, int idnode3)
{
if (!myType == SMESHDS_AddTriangle)
if (myType != SMESHDS_AddTriangle)
{
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
return;
@ -127,7 +127,7 @@ void SMESHDS_Command::AddFace(int NewFaceID,
void SMESHDS_Command::AddFace(int NewFaceID,
int idnode1, int idnode2, int idnode3, int idnode4)
{
if (!myType == SMESHDS_AddQuadrangle)
if (myType != SMESHDS_AddQuadrangle)
{
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
return;
@ -147,7 +147,7 @@ void SMESHDS_Command::AddFace(int NewFaceID,
void SMESHDS_Command::AddVolume(int NewVolID,
int idnode1, int idnode2, int idnode3, int idnode4)
{
if (!myType == SMESHDS_AddTetrahedron)
if (myType != SMESHDS_AddTetrahedron)
{
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
@ -167,7 +167,7 @@ void SMESHDS_Command::AddVolume(int NewVolID,
void SMESHDS_Command::AddVolume(int NewVolID,
int idnode1, int idnode2, int idnode3, int idnode4, int idnode5)
{
if (!myType == SMESHDS_AddPyramid)
if (myType != SMESHDS_AddPyramid)
{
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
@ -189,7 +189,7 @@ void SMESHDS_Command::AddVolume(int NewVolID,
int idnode1,
int idnode2, int idnode3, int idnode4, int idnode5, int idnode6)
{
if (!myType == SMESHDS_AddPrism)
if (myType != SMESHDS_AddPrism)
{
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
@ -214,7 +214,7 @@ void SMESHDS_Command::AddVolume(int NewVolID,
int idnode3,
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8)
{
if (!myType == SMESHDS_AddHexahedron)
if (myType != SMESHDS_AddHexahedron)
{
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
@ -238,7 +238,7 @@ void SMESHDS_Command::AddVolume(int NewVolID,
void SMESHDS_Command::AddPolygonalFace (const int ElementID,
std::vector<int> nodes_ids)
{
if (!myType == SMESHDS_AddPolygon) {
if (myType != SMESHDS_AddPolygon) {
MESSAGE("SMESHDS_Command::AddPolygonalFace : Bad Type");
return;
}
@ -261,7 +261,7 @@ void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
std::vector<int> nodes_ids,
std::vector<int> quantities)
{
if (!myType == SMESHDS_AddPolyhedron) {
if (myType != SMESHDS_AddPolyhedron) {
MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type");
return;
}
@ -288,7 +288,7 @@ void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
//=======================================================================
void SMESHDS_Command::RemoveNode(int NodeID)
{
if (!myType == SMESHDS_RemoveNode)
if (myType != SMESHDS_RemoveNode)
{
MESSAGE("SMESHDS_Command::RemoveNode : Bad Type");
return;
@ -303,7 +303,7 @@ void SMESHDS_Command::RemoveNode(int NodeID)
//=======================================================================
void SMESHDS_Command::RemoveElement(int ElementID)
{
if (!myType == SMESHDS_RemoveElement)
if (myType != SMESHDS_RemoveElement)
{
MESSAGE("SMESHDS_Command::RemoveElement : Bad Type");
return;
@ -319,7 +319,7 @@ void SMESHDS_Command::RemoveElement(int ElementID)
void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes)
{
if (!myType == SMESHDS_ChangeElementNodes)
if (myType != SMESHDS_ChangeElementNodes)
{
MESSAGE("SMESHDS_Command::ChangeElementNodes : Bad Type");
return;
@ -369,7 +369,7 @@ void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
void SMESHDS_Command::Renumber (const bool isNodes, const int startID, const int deltaID)
{
if (!myType == SMESHDS_Renumber)
if (myType != SMESHDS_Renumber)
{
MESSAGE("SMESHDS_Command::Renumber : Bad Type");
return;
@ -427,7 +427,7 @@ const list < double >&SMESHDS_Command::GetCoords()
//=======================================================================
void SMESHDS_Command::AddEdge(int NewEdgeID, int n1, int n2, int n12)
{
if (!myType == SMESHDS_AddQuadEdge) {
if (myType != SMESHDS_AddQuadEdge) {
MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
return;
}
@ -446,7 +446,7 @@ void SMESHDS_Command::AddFace(int NewFaceID,
int n1, int n2, int n3,
int n12, int n23, int n31)
{
if (!myType == SMESHDS_AddQuadTriangle) {
if (myType != SMESHDS_AddQuadTriangle) {
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
return;
}
@ -468,7 +468,7 @@ void SMESHDS_Command::AddFace(int NewFaceID,
int n1, int n2, int n3, int n4,
int n12, int n23, int n34, int n41)
{
if (!myType == SMESHDS_AddQuadQuadrangle) {
if (myType != SMESHDS_AddQuadQuadrangle) {
MESSAGE("SMESHDS_Command::AddFace : Bad Type");
return;
}
@ -492,7 +492,7 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
int n12, int n23, int n31,
int n14, int n24, int n34)
{
if (!myType == SMESHDS_AddQuadTetrahedron) {
if (myType != SMESHDS_AddQuadTetrahedron) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
}
@ -519,7 +519,7 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2,
int n12, int n23, int n34, int n41,
int n15, int n25, int n35, int n45)
{
if (!myType == SMESHDS_AddQuadPyramid) {
if (myType != SMESHDS_AddQuadPyramid) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
}
@ -550,7 +550,7 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2,
int n45, int n56, int n64,
int n14, int n25, int n36)
{
if (!myType == SMESHDS_AddQuadPentahedron) {
if (myType != SMESHDS_AddQuadPentahedron) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
}
@ -583,7 +583,7 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3,
int n56, int n67, int n78, int n85,
int n15, int n26, int n37, int n48)
{
if (!myType == SMESHDS_AddQuadHexahedron) {
if (myType != SMESHDS_AddQuadHexahedron) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
return;
}