X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FRWStl%2FRWStl.cxx;h=505b6f68ea51bc18765e891d6ff417f727cefa36;hb=c37bd936c37f3d3b7f0c3ee3844fcc6cc0215062;hpb=4e8c1d86666198c4b272d90daa646c64d44dedc2 diff --git a/src/RWStl/RWStl.cxx b/src/RWStl/RWStl.cxx index 0d05334..505b6f6 100644 --- a/src/RWStl/RWStl.cxx +++ b/src/RWStl/RWStl.cxx @@ -26,6 +26,7 @@ namespace static const Standard_Integer THE_STL_SIZEOF_FACET = 50; static const Standard_Integer IND_THRESHOLD = 1000; // increment the indicator every 1k triangles + static const size_t THE_BUFFER_SIZE = 1024; // The length of buffer to read (in bytes) //! Writing a Little Endian 32 bits integer inline static void convertInteger (const Standard_Integer theValue, @@ -199,7 +200,8 @@ Handle(Poly_Triangulation) RWStl::ReadAscii (const OSD_Path& theFile, aStream.seekg (0, aStream.beg); Reader aReader; - if (!aReader.ReadAscii (aStream, theEnd, theProgress)) + Standard_ReadLineBuffer aBuffer (THE_BUFFER_SIZE); + if (!aReader.ReadAscii (aStream, aBuffer, theEnd, theProgress)) { return Handle(Poly_Triangulation)(); }