mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0023336: The 'strcmp' function returns 0 if corresponding strings are equal.
Checking if the return value from 'strcmp' is '0'.
This commit is contained in:
parent
5dc6fb935c
commit
fafad173ed
@ -71,9 +71,9 @@ void RWStepShape_RWAngularLocation::ReadStep (const Handle(StepData_StepReaderDa
|
|||||||
StepShape_AngleRelator aAngleSelection = StepShape_Small;
|
StepShape_AngleRelator aAngleSelection = StepShape_Small;
|
||||||
if (data->ParamType (num, 5) == Interface_ParamEnum) {
|
if (data->ParamType (num, 5) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num, 5);
|
Standard_CString text = data->ParamCValue(num, 5);
|
||||||
if (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal;
|
if (strcmp(text, ".EQUAL.") == 0) aAngleSelection = StepShape_Equal;
|
||||||
else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;
|
else if (strcmp(text, ".LARGE.") == 0) aAngleSelection = StepShape_Large;
|
||||||
else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small;
|
else if (strcmp(text, ".SMALL.") == 0) aAngleSelection = StepShape_Small;
|
||||||
else ach->AddFail("Parameter #5 (angle_selection) has not allowed value");
|
else ach->AddFail("Parameter #5 (angle_selection) has not allowed value");
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #5 (angle_selection) is not enumeration");
|
else ach->AddFail("Parameter #5 (angle_selection) is not enumeration");
|
||||||
|
@ -60,9 +60,9 @@ void RWStepShape_RWAngularSize::ReadStep (const Handle(StepData_StepReaderData)&
|
|||||||
StepShape_AngleRelator aAngleSelection = StepShape_Small;
|
StepShape_AngleRelator aAngleSelection = StepShape_Small;
|
||||||
if (data->ParamType (num, 3) == Interface_ParamEnum) {
|
if (data->ParamType (num, 3) == Interface_ParamEnum) {
|
||||||
Standard_CString text = data->ParamCValue(num, 3);
|
Standard_CString text = data->ParamCValue(num, 3);
|
||||||
if (strcmp(text, ".EQUAL.")) aAngleSelection = StepShape_Equal;
|
if (strcmp(text, ".EQUAL.") == 0) aAngleSelection = StepShape_Equal;
|
||||||
else if (strcmp(text, ".LARGE.")) aAngleSelection = StepShape_Large;
|
else if (strcmp(text, ".LARGE.") == 0) aAngleSelection = StepShape_Large;
|
||||||
else if (strcmp(text, ".SMALL.")) aAngleSelection = StepShape_Small;
|
else if (strcmp(text, ".SMALL.") == 0) aAngleSelection = StepShape_Small;
|
||||||
else ach->AddFail("Parameter #3 (angle_selection) has not allowed value");
|
else ach->AddFail("Parameter #3 (angle_selection) has not allowed value");
|
||||||
}
|
}
|
||||||
else ach->AddFail("Parameter #3 (angle_selection) is not enumeration");
|
else ach->AddFail("Parameter #3 (angle_selection) is not enumeration");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user