mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
0032352: Coding Rules - clean up code from compatibility hacks with pre-C++11 compilers
Removed usage of std::auto_ptr. opencascade::std workarounds for VS2008 have been dropped, when possible. OCCT_NO_RVALUE_REFERENCE workaround for VS2008 has been removed.
This commit is contained in:
@@ -68,7 +68,7 @@ Handle(Image_CompressedPixMap) Image_DDSParser::Load (const Handle(Image_Support
|
||||
const int64_t theFileOffset)
|
||||
{
|
||||
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||
opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
|
||||
std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary);
|
||||
char aHeader[128] = {};
|
||||
if (aFile.get() == NULL || !aFile->good())
|
||||
{
|
||||
|
@@ -186,7 +186,7 @@ Handle(Image_PixMap) Image_Texture::loadImageOffset (const TCollection_AsciiStri
|
||||
}
|
||||
|
||||
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||
opencascade::std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (thePath, std::ios::in | std::ios::binary);
|
||||
std::shared_ptr<std::istream> aFile = aFileSystem->OpenIStream (thePath, std::ios::in | std::ios::binary);
|
||||
if (aFile.get() == NULL)
|
||||
{
|
||||
Message::SendFail (TCollection_AsciiString ("Error: Image file '") + thePath + "' cannot be opened");
|
||||
@@ -252,7 +252,7 @@ TCollection_AsciiString Image_Texture::ProbeImageFileFormat() const
|
||||
else
|
||||
{
|
||||
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||
opencascade::std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
|
||||
std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
|
||||
if (aFileIn.get() == NULL)
|
||||
{
|
||||
Message::SendFail (TCollection_AsciiString ("Error: Unable to open file '") + myImagePath + "'");
|
||||
@@ -316,7 +316,7 @@ TCollection_AsciiString Image_Texture::ProbeImageFileFormat() const
|
||||
Standard_Boolean Image_Texture::WriteImage (const TCollection_AsciiString& theFile)
|
||||
{
|
||||
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||
opencascade::std::shared_ptr<std::ostream> aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc);
|
||||
std::shared_ptr<std::ostream> aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc);
|
||||
if (aFileOut.get() == NULL)
|
||||
{
|
||||
Message::SendFail (TCollection_AsciiString ("Error: Unable to create file '") + theFile + "'");
|
||||
@@ -357,7 +357,7 @@ Standard_Boolean Image_Texture::WriteImage (std::ostream& theStream,
|
||||
}
|
||||
|
||||
const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem();
|
||||
opencascade::std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
|
||||
std::shared_ptr<std::istream> aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary);
|
||||
if (aFileIn.get() == NULL)
|
||||
{
|
||||
Message::SendFail (TCollection_AsciiString ("Error: Unable to open file ") + myImagePath + "!");
|
||||
|
Reference in New Issue
Block a user