mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-09 18:50:54 +03:00
0029944: Porting to VC 2017 : Regressions on the gcc (Debian 4.9.2-10) 4.9.2. Exception is raised during load STEP file.
Boolean parameter "same_sence" from class RWStepShape_RWAdvancedFace.cxx is now initialized correctly.
This commit is contained in:
parent
c520fb2aa2
commit
e119b6c3c7
@ -68,7 +68,7 @@ void RWStepShape_RWAdvancedFace::ReadStep
|
|||||||
|
|
||||||
// --- inherited field : sameSense ---
|
// --- inherited field : sameSense ---
|
||||||
|
|
||||||
Standard_Boolean aSameSense;
|
Standard_Boolean aSameSense = Standard_True;
|
||||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
//szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
|
||||||
data->ReadBoolean (num,4,"same_sense",ach,aSameSense);
|
data->ReadBoolean (num,4,"same_sense",ach,aSameSense);
|
||||||
|
|
||||||
|
@ -1154,6 +1154,7 @@ Standard_Boolean StepData_StepReaderData::ReadBoolean(const Standard_Integer num
|
|||||||
Handle(Interface_Check)& ach,
|
Handle(Interface_Check)& ach,
|
||||||
Standard_Boolean& flag) const
|
Standard_Boolean& flag) const
|
||||||
{
|
{
|
||||||
|
flag = Standard_True;
|
||||||
Handle(String) errmess; // Null si pas d erreur
|
Handle(String) errmess; // Null si pas d erreur
|
||||||
if (nump > 0 && nump <= NbParams(num)) {
|
if (nump > 0 && nump <= NbParams(num)) {
|
||||||
const Interface_FileParameter& FP = Param(num, nump);
|
const Interface_FileParameter& FP = Param(num, nump);
|
||||||
@ -1161,11 +1162,11 @@ Standard_Boolean StepData_StepReaderData::ReadBoolean(const Standard_Integer num
|
|||||||
Standard_CString txt = FP.CValue();
|
Standard_CString txt = FP.CValue();
|
||||||
if (!strcmp(txt, ".T.")) flag = Standard_True;
|
if (!strcmp(txt, ".T.")) flag = Standard_True;
|
||||||
else if (!strcmp(txt, ".F.")) flag = Standard_False;
|
else if (!strcmp(txt, ".F.")) flag = Standard_False;
|
||||||
else errmess = new String("Parameter n0.%d (%s) : Incorrect Boolean Value");
|
else errmess = new String("Parameter n0.%d (%s) : Incorrect Boolean Value. It was set to true");
|
||||||
}
|
}
|
||||||
else errmess = new String("Parameter n0.%d (%s) not a Boolean");
|
else errmess = new String("Parameter n0.%d (%s) not a Boolean. It was set to true");
|
||||||
}
|
}
|
||||||
else errmess = new String("Parameter n0.%d (%s) absent");
|
else errmess = new String("Parameter n0.%d (%s) absent.It was set to true");
|
||||||
|
|
||||||
if (errmess.IsNull()) return Standard_True;
|
if (errmess.IsNull()) return Standard_True;
|
||||||
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
sprintf(txtmes, errmess->ToCString(), nump, mess);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user