1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -37,6 +37,7 @@
#include <BinTObjDrivers.hxx>
#include <XmlTObjDrivers.hxx>
#include <OSD_FileSystem.hxx>
#include <OSD_OpenFile.hxx>
#include <stdio.h>
@@ -251,9 +252,9 @@ static Standard_Integer loadModel (Draw_Interpretor& di, Standard_Integer argc,
aModel = new TObjDRAW_Model();
if (anUseStream)
{
std::ifstream aFileStream;
OSD_OpenStream (aFileStream, aPath, std::ios::in | std::ios::binary);
isLoaded = aModel->Load (aFileStream);
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
opencascade::std::shared_ptr<std::istream> aFileStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary);
isLoaded = aModel->Load (*aFileStream);
}
else
isLoaded = aModel->Load (aPath);