1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0023337: The 'strcmp' function returns 0 if corresponding strings are equal. (1)

Checking if the return value from 'strcmp' is '0'.
This commit is contained in:
Pawel 2012-07-20 15:59:02 +02:00 committed by Pawel Kowalski
parent fafad173ed
commit b28f4666f9

View File

@ -93,26 +93,26 @@ Standard_Boolean IGESGraph_ToolDrawingUnits::OwnCorrect
Standard_CString unm = "";
if (!ent->Unit().IsNull()) unm = ent->Unit()->ToCString();
switch (unf) {
case 1 : if (strcmp(unm,"IN") && strcmp(unm,"INCH"))
case 1 : if ((strcmp(unm,"IN") == 0) || (strcmp(unm,"INCH") == 0))
name = new TCollection_HAsciiString ("IN"); break;
case 2 : if (strcmp(unm,"MM"))
case 2 : if (strcmp(unm,"MM") == 0)
name = new TCollection_HAsciiString ("MM"); break;
case 3 : break; // nom libre
case 4 : if (strcmp(unm,"FT"))
case 4 : if (strcmp(unm,"FT") == 0)
name = new TCollection_HAsciiString ("FT"); break;
case 5 : if (strcmp(unm,"MI"))
case 5 : if (strcmp(unm,"MI") == 0)
name = new TCollection_HAsciiString ("MI"); break;
case 6 : if (strcmp(unm,"M"))
case 6 : if (strcmp(unm,"M") == 0)
name = new TCollection_HAsciiString ("M"); break;
case 7 : if (strcmp(unm,"KM"))
case 7 : if (strcmp(unm,"KM") == 0)
name = new TCollection_HAsciiString ("KM"); break;
case 8 : if (strcmp(unm,"MIL"))
case 8 : if (strcmp(unm,"MIL") == 0)
name = new TCollection_HAsciiString ("MIL"); break;
case 9 : if (strcmp(unm,"UM"))
case 9 : if (strcmp(unm,"UM") == 0)
name = new TCollection_HAsciiString ("UM"); break;
case 10 : if (strcmp(unm,"CM"))
case 10 : if (strcmp(unm,"CM") == 0)
name = new TCollection_HAsciiString ("CM"); break;
case 11 : if (strcmp(unm,"UIN"))
case 11 : if (strcmp(unm,"UIN") == 0)
name = new TCollection_HAsciiString ("UIN"); break;
default : break; // on ne peut rien faire ... ?
}