1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-18 14:27:39 +03:00

Compare commits

...

1 Commits

Author SHA1 Message Date
dpasukhi
55b89e095f 0033671: Coding - GeomTools performance update
Update size of buffer for the brep parsing according standard
2024-06-01 12:15:40 +00:00

View File

@@ -101,10 +101,11 @@ void GeomTools::GetReal(Standard_IStream& IS,Standard_Real& theValue)
theValue = 0.;
if (IS.eof())
return;
char buffer[256];
// According IEEE-754 Specification and standard stream parameters
// the most optimal buffer length is 25
char buffer[25];
buffer[0] = '\0';
std::streamsize anOldWide = IS.width(256);
std::streamsize anOldWide = IS.width(25);
IS >> buffer;
IS.width(anOldWide);
theValue = Strtod(buffer, NULL);