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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user