1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032455: Data Exchange - replace OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()

- replaced OSD_OpenStream() usage with OSD_FileSystem::DefaultFileSystem()
This commit is contained in:
mkrylova
2021-07-14 15:06:35 +03:00
committed by bugmaster
parent 000c21fa0c
commit ad3f20c684
17 changed files with 150 additions and 152 deletions

View File

@@ -747,15 +747,16 @@ Standard_Boolean BRepTools::Read(TopoDS_Shape& Sh,
const BRep_Builder& B,
const Message_ProgressRange& theProgress)
{
std::filebuf fic;
std::istream in(&fic);
OSD_OpenStream (fic, File, std::ios::in);
if(!fic.is_open()) return Standard_False;
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
opencascade::std::shared_ptr<std::istream> aStream = aFileSystem->OpenIStream (File, std::ios::in);
if (aStream.get() == NULL)
{
return Standard_False;
}
BRepTools_ShapeSet SS(B);
SS.Read(in, theProgress);
SS.Read (*aStream, theProgress);
if(!SS.NbShapes()) return Standard_False;
SS.Read(Sh,in);
SS.Read (Sh,*aStream);
return Standard_True;
}