diff --git a/src/BRepFill/BRepFill_Filling.hxx b/src/BRepFill/BRepFill_Filling.hxx index 558cdc3a18..74a4b31a4b 100644 --- a/src/BRepFill/BRepFill_Filling.hxx +++ b/src/BRepFill/BRepFill_Filling.hxx @@ -183,7 +183,7 @@ private: private: - opencascade::std::shared_ptr myBuilder; + std::shared_ptr myBuilder; BRepFill_SequenceOfEdgeFaceAndOrder myBoundary; BRepFill_SequenceOfEdgeFaceAndOrder myConstraints; BRepFill_SequenceOfFaceAndOrder myFreeConstraints; diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index 7b75cc325b..a6ad77c8f8 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -712,7 +712,7 @@ Standard_Boolean BRepTools::Write (const TopoDS_Shape& theShape, const Message_ProgressRange& theProgress) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out); if (aStream.get() == NULL || !aStream->good()) { return Standard_False; @@ -754,7 +754,7 @@ Standard_Boolean BRepTools::Read(TopoDS_Shape& Sh, const Message_ProgressRange& theProgress) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (File, std::ios::in); + std::shared_ptr aStream = aFileSystem->OpenIStream (File, std::ios::in); if (aStream.get() == NULL) { return Standard_False; diff --git a/src/BVH/BVH_BinaryTree.hxx b/src/BVH/BVH_BinaryTree.hxx index c9db4cad40..80d36aca17 100644 --- a/src/BVH/BVH_BinaryTree.hxx +++ b/src/BVH/BVH_BinaryTree.hxx @@ -215,21 +215,21 @@ BVH_Tree* BVH_Tree::CollapseToQuadTree { const std::pair aNode = aQueue.front(); - BVH::Array::Append (aQBVH->myMinPointBuffer, BVH::Array::Value (this->myMinPointBuffer, opencascade::std::get<0> (aNode))); - BVH::Array::Append (aQBVH->myMaxPointBuffer, BVH::Array::Value (this->myMaxPointBuffer, opencascade::std::get<0> (aNode))); + BVH::Array::Append (aQBVH->myMinPointBuffer, BVH::Array::Value (this->myMinPointBuffer, std::get<0> (aNode))); + BVH::Array::Append (aQBVH->myMaxPointBuffer, BVH::Array::Value (this->myMaxPointBuffer, std::get<0> (aNode))); BVH_Vec4i aNodeInfo; - if (this->IsOuter (opencascade::std::get<0> (aNode))) // is leaf node + if (this->IsOuter (std::get<0> (aNode))) // is leaf node { aNodeInfo = BVH_Vec4i (1 /* leaf flag */, - this->BegPrimitive (opencascade::std::get<0> (aNode)), this->EndPrimitive (opencascade::std::get<0> (aNode)), opencascade::std::get<1> (aNode) /* level */); + this->BegPrimitive (std::get<0> (aNode)), this->EndPrimitive (std::get<0> (aNode)), std::get<1> (aNode) /* level */); } else { NCollection_Vector aGrandChildNodes; - const int aLftChild = Child<0> (opencascade::std::get<0> (aNode)); - const int aRghChild = Child<1> (opencascade::std::get<0> (aNode)); + const int aLftChild = Child<0> (std::get<0> (aNode)); + const int aRghChild = Child<1> (std::get<0> (aNode)); if (this->IsOuter (aLftChild)) // is leaf node { aGrandChildNodes.Append (aLftChild); @@ -252,13 +252,13 @@ BVH_Tree* BVH_Tree::CollapseToQuadTree for (int aNodeIdx = 0; aNodeIdx < aGrandChildNodes.Size(); ++aNodeIdx) { - aQueue.push_back (std::make_pair (aGrandChildNodes (aNodeIdx), opencascade::std::get<1> (aNode) + 1)); + aQueue.push_back (std::make_pair (aGrandChildNodes (aNodeIdx), std::get<1> (aNode) + 1)); } aNodeInfo = BVH_Vec4i (0 /* inner flag */, - aNbNodes, aGrandChildNodes.Size() - 1, opencascade::std::get<1> (aNode) /* level */); + aNbNodes, aGrandChildNodes.Size() - 1, std::get<1> (aNode) /* level */); - aQBVH->myDepth = Max (aQBVH->myDepth, opencascade::std::get<1> (aNode) + 1); + aQBVH->myDepth = Max (aQBVH->myDepth, std::get<1> (aNode) + 1); aNbNodes += aGrandChildNodes.Size(); } diff --git a/src/BVH/BVH_Types.hxx b/src/BVH/BVH_Types.hxx index 10dc849169..12e7260412 100644 --- a/src/BVH/BVH_Types.hxx +++ b/src/BVH/BVH_Types.hxx @@ -275,14 +275,7 @@ namespace BVH if (Size (theArray) == theCount) { #ifdef _STD_VECTOR_SHRINK - -#if(defined(_MSC_VER) && (_MSC_VER < 1600)) - BVH_ArrayNt aTmpArray(theArray); - theArray.swap(aTmpArray); -#else theArray.shrink_to_fit(); -#endif - #endif } else diff --git a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx index 9d35102059..0c75fcfefa 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentRetrievalDriver.cxx @@ -78,7 +78,7 @@ void BinLDrivers_DocumentRetrievalDriver::Read const Message_ProgressRange& theRange) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (theFileName, std::ios::in | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (theFileName, std::ios::in | std::ios::binary); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx index 2dd4bacd8b..0a5ec15f77 100644 --- a/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx +++ b/src/BinLDrivers/BinLDrivers_DocumentStorageDriver.cxx @@ -75,7 +75,7 @@ void BinLDrivers_DocumentStorageDriver::Write myFileName = theFileName; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out | std::ios::binary); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/BinTools/BinTools.cxx b/src/BinTools/BinTools.cxx index 686a0c600d..6fde4f9dd6 100644 --- a/src/BinTools/BinTools.cxx +++ b/src/BinTools/BinTools.cxx @@ -215,7 +215,7 @@ Standard_Boolean BinTools::Write (const TopoDS_Shape& theShape, const Message_ProgressRange& theRange) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary); aStream->precision (15); if (aStream.get() == NULL || !aStream->good()) return Standard_False; @@ -234,7 +234,7 @@ Standard_Boolean BinTools::Read (TopoDS_Shape& theShape, const Standard_CString const Message_ProgressRange& theRange) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); if (aStream.get() == NULL) { return Standard_False; diff --git a/src/ChFi3d/ChFi3d_ChBuilder.cxx b/src/ChFi3d/ChFi3d_ChBuilder.cxx index 29bdbac19d..dfef8e25d1 100644 --- a/src/ChFi3d/ChFi3d_ChBuilder.cxx +++ b/src/ChFi3d/ChFi3d_ChBuilder.cxx @@ -789,13 +789,8 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, radius = Max(dis, radiusspine); locfleche = radius*1.e-2; //graphic criterion -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -886,13 +881,8 @@ ChFi3d_ChBuilder::SimulSurf(Handle(ChFiDS_SurfData)& Data, radius = Max(radius, radiusspine); locfleche = radius*1.e-2; //graphic criterion -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1202,11 +1192,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Real dis; chsp->GetDist(dis); -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; -#else std::unique_ptr pFunc; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1274,11 +1260,7 @@ Standard_Boolean ChFi3d_ChBuilder::PerformFirstSection Standard_Real dis1, dis2; chsp->Dists(dis1, dis2); -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; -#else std::unique_ptr pFunc; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1493,13 +1475,8 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, if (chsp->IsChamfer() == ChFiDS_Sym) { -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); @@ -1527,13 +1504,8 @@ ChFi3d_ChBuilder::PerformSurf(ChFiDS_SequenceOfSurfData& SeqData, Standard_Real d1, d2; chsp->Dists(d1,d2); -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pFunc; - std::auto_ptr pFInv; -#else std::unique_ptr pFunc; std::unique_ptr pFInv; -#endif if (chsp->Mode() == ChFiDS_ClassicChamfer) { pFunc.reset(new BRepBlend_Chamfer(S1,S2,HGuide)); diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index e2e03fff0d..9633b081c9 100644 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -1580,7 +1580,7 @@ static Standard_Integer readbrep (Draw_Interpretor& theDI, { // probe file header to recognize format const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (aFileName, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (aFileName, std::ios::in | std::ios::binary); if (aFile.get() == NULL) { theDI << "Error: cannot read the file '" << aFileName << "'"; diff --git a/src/DDocStd/DDocStd_ApplicationCommands.cxx b/src/DDocStd/DDocStd_ApplicationCommands.cxx index 9f093fee64..35be9fd189 100644 --- a/src/DDocStd/DDocStd_ApplicationCommands.cxx +++ b/src/DDocStd/DDocStd_ApplicationCommands.cxx @@ -180,7 +180,7 @@ static Standard_Integer DDocStd_Open (Draw_Interpretor& di, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (path, std::ios::in | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (path, std::ios::in | std::ios::binary); theStatus = A->Open (*aFileStream, D, aFilter, aProgress->Start()); } @@ -298,7 +298,7 @@ static Standard_Integer DDocStd_SaveAs (Draw_Interpretor& di, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (path, std::ios::out | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenOStream (path, std::ios::out | std::ios::binary); theStatus = A->SaveAs (D, *aFileStream, aProgress->Start()); } else diff --git a/src/Draw/Draw_VariableCommands.cxx b/src/Draw/Draw_VariableCommands.cxx index 7368c92ad5..8f0b4f68ec 100644 --- a/src/Draw/Draw_VariableCommands.cxx +++ b/src/Draw/Draw_VariableCommands.cxx @@ -92,7 +92,7 @@ static Standard_Integer save (Draw_Interpretor& theDI, const char* aName = theArgVec[2]; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (aName, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (aName, std::ios::out); aStream->precision (15); if (aStream.get() == NULL || !aStream->good()) { @@ -145,7 +145,7 @@ static Standard_Integer restore (Draw_Interpretor& theDI, const char* aVarName = theArgVec[2]; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (aFileName, std::ios::in); + std::shared_ptr aStream = aFileSystem->OpenIStream (aFileName, std::ios::in); if (aStream.get() == NULL) { theDI << "Error: cannot open file for reading: '" << aFileName << "'"; diff --git a/src/IGESControl/IGESControl_Writer.cxx b/src/IGESControl/IGESControl_Writer.cxx index 565c1c216b..735f49ac06 100644 --- a/src/IGESControl/IGESControl_Writer.cxx +++ b/src/IGESControl/IGESControl_Writer.cxx @@ -254,7 +254,7 @@ Standard_Boolean IGESControl_Writer::Write (const Standard_CString file, const Standard_Boolean fnes) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (file, std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (file, std::ios::out); if (aStream.get() == NULL) { return Standard_False; diff --git a/src/IGESSelect/IGESSelect_WorkLibrary.cxx b/src/IGESSelect/IGESSelect_WorkLibrary.cxx index ddb43057b0..50f583078c 100644 --- a/src/IGESSelect/IGESSelect_WorkLibrary.cxx +++ b/src/IGESSelect/IGESSelect_WorkLibrary.cxx @@ -102,7 +102,7 @@ static Handle(IGESData_FileProtocol) IGESProto; if (igesmod.IsNull() || prot.IsNull()) return Standard_False; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out); + std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out); if (aStream.get() == NULL) { ctx.CCheck(0)->AddFail("IGES File could not be created"); diff --git a/src/Image/Image_DDSParser.cxx b/src/Image/Image_DDSParser.cxx index c2716f4eb0..3dac22947c 100644 --- a/src/Image/Image_DDSParser.cxx +++ b/src/Image/Image_DDSParser.cxx @@ -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 aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); char aHeader[128] = {}; if (aFile.get() == NULL || !aFile->good()) { diff --git a/src/Image/Image_Texture.cxx b/src/Image/Image_Texture.cxx index 9892b63e76..34948c016a 100644 --- a/src/Image/Image_Texture.cxx +++ b/src/Image/Image_Texture.cxx @@ -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 aFile = aFileSystem->OpenIStream (thePath, std::ios::in | std::ios::binary); + std::shared_ptr 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 aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary); + std::shared_ptr 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 aFileOut = aFileSystem->OpenOStream (theFile, std::ios::out | std::ios::binary | std::ios::trunc); + std::shared_ptr 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 aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary); + std::shared_ptr aFileIn = aFileSystem->OpenIStream (myImagePath, std::ios::in | std::ios::binary); if (aFileIn.get() == NULL) { Message::SendFail (TCollection_AsciiString ("Error: Unable to open file ") + myImagePath + "!"); diff --git a/src/IntStart/IntStart_SearchOnBoundaries.gxx b/src/IntStart/IntStart_SearchOnBoundaries.gxx index bb075d5e95..8c013fbce1 100644 --- a/src/IntStart/IntStart_SearchOnBoundaries.gxx +++ b/src/IntStart/IntStart_SearchOnBoundaries.gxx @@ -359,11 +359,7 @@ void BoundedArc (const TheArc& A, Standard_Boolean IsIntCSdone = Standard_False; TColStd_SequenceOfReal Params; -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr pSol; -#else std::unique_ptr pSol; -#endif math_FunctionSample Echant(Pdeb,Pfin,NbEchant); diff --git a/src/IntTools/IntTools_FClass2d.cxx b/src/IntTools/IntTools_FClass2d.cxx index 0f24cb8e1d..75634f66d0 100644 --- a/src/IntTools/IntTools_FClass2d.cxx +++ b/src/IntTools/IntTools_FClass2d.cxx @@ -823,19 +823,20 @@ TopAbs_State IntTools_FClass2d::TestOnRestriction } } //for (;;) } + //======================================================================= -//function : Destroy -//purpose : +//function : ~IntTools_FClass2d +//purpose : //======================================================================= -void IntTools_FClass2d::Destroy() -{ - Standard_Integer nbtabclass = TabClass.Length(); - for(Standard_Integer d=1; d<=nbtabclass;d++) { - if(TabClass(d)) { +IntTools_FClass2d::~IntTools_FClass2d() +{ + Standard_Integer nbtabclass = TabClass.Length(); + for (Standard_Integer d = 1; d <= nbtabclass; d++) + { + if (TabClass(d)) + { delete ((CSLib_Class2d *)TabClass(d)); TabClass(d)=NULL; } } } - - diff --git a/src/IntTools/IntTools_FClass2d.hxx b/src/IntTools/IntTools_FClass2d.hxx index c1fe685123..aff1593d22 100644 --- a/src/IntTools/IntTools_FClass2d.hxx +++ b/src/IntTools/IntTools_FClass2d.hxx @@ -40,61 +40,38 @@ public: DEFINE_STANDARD_ALLOC - - //! Empty constructor Standard_EXPORT IntTools_FClass2d(); - //! Initializes algorithm by the face F //! and tolerance Tol Standard_EXPORT IntTools_FClass2d(const TopoDS_Face& F, const Standard_Real Tol); - //! Initializes algorithm by the face F //! and tolerance Tol Standard_EXPORT void Init (const TopoDS_Face& F, const Standard_Real Tol); - //! Returns state of infinite 2d point relatively to (0, 0) Standard_EXPORT TopAbs_State PerformInfinitePoint() const; - //! Returns state of the 2d point Puv. - //! If RecadreOnPeriodic is true (defalut value), + //! If RecadreOnPeriodic is true (default value), //! for the periodic surface 2d point, adjusted to period, is //! classified. Standard_EXPORT TopAbs_State Perform (const gp_Pnt2d& Puv, const Standard_Boolean RecadreOnPeriodic = Standard_True) const; - //! Destructor - Standard_EXPORT void Destroy(); -~IntTools_FClass2d() -{ - Destroy(); -} - + Standard_EXPORT ~IntTools_FClass2d(); //! Test a point with +- an offset (Tol) and returns //! On if some points are OUT an some are IN //! (Caution: Internal use . see the code for more details) Standard_EXPORT TopAbs_State TestOnRestriction (const gp_Pnt2d& Puv, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) const; - + Standard_EXPORT Standard_Boolean IsHole() const; - - - -protected: - - - - - private: - - BRepTopAdaptor_SeqOfPtr TabClass; TColStd_SequenceOfInteger TabOrien; Standard_Real Toluv; @@ -109,22 +86,8 @@ private: Standard_Real Vmax; Standard_Boolean myIsHole; -#ifdef _MSC_VER -#if _MSC_VER < 1600 - mutable std::auto_ptr myFExplorer; -#else mutable std::unique_ptr myFExplorer; -#endif -#else - mutable std::unique_ptr myFExplorer; -#endif }; - - - - - - #endif // _IntTools_FClass2d_HeaderFile diff --git a/src/LDOM/LDOMParser.cxx b/src/LDOM/LDOMParser.cxx index 6ee1ecfe7a..e34712e852 100644 --- a/src/LDOM/LDOMParser.cxx +++ b/src/LDOM/LDOMParser.cxx @@ -148,7 +148,7 @@ Standard_Boolean LDOMParser::parse (std::istream& anInput, Standard_Boolean LDOMParser::parse (const char * const aFileName) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (aFileName, std::ios::in); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (aFileName, std::ios::in); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/NCollection/NCollection_AliasedArray.hxx b/src/NCollection/NCollection_AliasedArray.hxx index fa5efeb7f2..a13a000861 100644 --- a/src/NCollection/NCollection_AliasedArray.hxx +++ b/src/NCollection/NCollection_AliasedArray.hxx @@ -64,14 +64,12 @@ public: } } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_AliasedArray (NCollection_AliasedArray&& theOther) : myData (theOther.myData), myStride (theOther.myStride), mySize (theOther.mySize), myDeletable (theOther.myDeletable) { theOther.myDeletable = false; } -#endif //! Constructor wrapping pre-allocated C-array of values without copying them. template @@ -155,13 +153,11 @@ public: return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator; @sa Move() NCollection_AliasedArray& operator= (NCollection_AliasedArray&& theOther) { return Move (theOther); } -#endif //! Resizes the array to specified bounds. //! No re-allocation will be done if length of array does not change, diff --git a/src/NCollection/NCollection_Array1.hxx b/src/NCollection/NCollection_Array1.hxx index 97718aedb2..473f050b64 100644 --- a/src/NCollection/NCollection_Array1.hxx +++ b/src/NCollection/NCollection_Array1.hxx @@ -176,7 +176,6 @@ public: Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_Array1 (NCollection_Array1&& theOther) : myLowerBound (theOther.myLowerBound), @@ -186,7 +185,6 @@ public: { theOther.myDeletable = false; } -#endif //! C array-based constructor. //! @@ -311,13 +309,11 @@ public: return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator; @sa Move() NCollection_Array1& operator= (NCollection_Array1&& theOther) { return Move (theOther); } -#endif //! @return first element const TheItemType& First() const diff --git a/src/NCollection/NCollection_Array2.hxx b/src/NCollection/NCollection_Array2.hxx index 65115eab35..a06d435c74 100644 --- a/src/NCollection/NCollection_Array2.hxx +++ b/src/NCollection/NCollection_Array2.hxx @@ -126,7 +126,6 @@ public: *this = theOther; } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_Array2 (NCollection_Array2&& theOther) : myLowerRow (theOther.myLowerRow), @@ -141,7 +140,6 @@ public: theOther.myData = NULL; theOther.myDeletable = false; } -#endif //! C array-based constructor NCollection_Array2(const TheItemType& theBegin, @@ -256,13 +254,11 @@ public: return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator; @sa Move() NCollection_Array2& operator= (NCollection_Array2&& theOther) { return Move (theOther); } -#endif //! Constant value access const TheItemType& Value (const Standard_Integer theRow, diff --git a/src/NCollection/NCollection_StlIterator.hxx b/src/NCollection/NCollection_StlIterator.hxx index 6789f4ab62..78fa3cf150 100644 --- a/src/NCollection/NCollection_StlIterator.hxx +++ b/src/NCollection/NCollection_StlIterator.hxx @@ -28,8 +28,8 @@ template class NCollection_StlIterator : public std::iterator::type, - typename opencascade::std::conditional::type> + typename std::conditional::type, + typename std::conditional::type> { public: @@ -71,13 +71,13 @@ protected: //! @name methods related to forward STL iterator // an appropriate method based on template arguments (at instantiation time). template - typename opencascade::std::enable_if::type Reference() const + typename std::enable_if::type Reference() const { return myIterator.ChangeValue(); } template - typename opencascade::std::enable_if::type Reference() const + typename std::enable_if::type Reference() const { return myIterator.Value(); } diff --git a/src/NCollection/NCollection_UBTreeFiller.hxx b/src/NCollection/NCollection_UBTreeFiller.hxx index 2b616bc54d..04e7b39c15 100644 --- a/src/NCollection/NCollection_UBTreeFiller.hxx +++ b/src/NCollection/NCollection_UBTreeFiller.hxx @@ -128,10 +128,10 @@ template class NCollection_UBTreeFiller private: // ---------- PRIVATE FIELDS ---------- - UBTree& myTree; - NCollection_Vector mySeqPtr; - opencascade::std::mt19937 myRandGen; //!< random number generator - Standard_Boolean myIsFullRandom; + UBTree& myTree; + NCollection_Vector mySeqPtr; + std::mt19937 myRandGen; //!< random number generator + Standard_Boolean myIsFullRandom; }; //======================================================================= diff --git a/src/NCollection/NCollection_UtfIterator.hxx b/src/NCollection/NCollection_UtfIterator.hxx index 3543639846..812376a59b 100755 --- a/src/NCollection/NCollection_UtfIterator.hxx +++ b/src/NCollection/NCollection_UtfIterator.hxx @@ -185,9 +185,9 @@ private: //! Standard_Utf16Char on Windows and to Standard_Utf32Char on Linux. template class CharTypeChooser : - public opencascade::std::conditional< sizeof(TypeChar) == 1, Standard_Utf8Char, - typename opencascade::std::conditional< sizeof(TypeChar) == 2, Standard_Utf16Char, - typename opencascade::std::conditional< sizeof(TypeChar) == 4, Standard_Utf32Char, void >::type >::type > + public std::conditional< sizeof(TypeChar) == 1, Standard_Utf8Char, + typename std::conditional< sizeof(TypeChar) == 2, Standard_Utf16Char, + typename std::conditional< sizeof(TypeChar) == 4, Standard_Utf32Char, void >::type >::type > { }; diff --git a/src/NCollection/NCollection_UtfString.hxx b/src/NCollection/NCollection_UtfString.hxx index ad180e1ff1..58792a5dea 100755 --- a/src/NCollection/NCollection_UtfString.hxx +++ b/src/NCollection/NCollection_UtfString.hxx @@ -80,10 +80,8 @@ public: //! @param theCopy string to copy. NCollection_UtfString (const NCollection_UtfString& theCopy); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor NCollection_UtfString (NCollection_UtfString&& theOther); -#endif //! Copy constructor from UTF-8 string. //! @param theCopyUtf8 UTF-8 string to copy @@ -209,10 +207,8 @@ public: //! @name assign operators //! Copy from another string. const NCollection_UtfString& operator= (const NCollection_UtfString& theOther) { return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator. NCollection_UtfString& operator= (NCollection_UtfString&& theOther) { Swap (theOther); return *this; } -#endif //! Copy from UTF-8 NULL-terminated string. const NCollection_UtfString& operator= (const char* theStringUtf8); diff --git a/src/NCollection/NCollection_UtfString.lxx b/src/NCollection/NCollection_UtfString.lxx index a80a2bb409..839b86bc78 100755 --- a/src/NCollection/NCollection_UtfString.lxx +++ b/src/NCollection/NCollection_UtfString.lxx @@ -90,7 +90,6 @@ NCollection_UtfString::NCollection_UtfString (const NCollection_UtfString& strCopy ((Standard_Byte* )myString, (const Standard_Byte* )theCopy.myString, mySize); } -#ifndef OCCT_NO_RVALUE_REFERENCE // ======================================================================= // function : NCollection_UtfString // purpose : @@ -105,7 +104,6 @@ NCollection_UtfString::NCollection_UtfString (NCollection_UtfString&& theO theOther.mySize = 0; theOther.myLength = 0; } -#endif // ======================================================================= // function : NCollection_UtfString diff --git a/src/OSD/OSD_CachedFileSystem.cxx b/src/OSD/OSD_CachedFileSystem.cxx index 123e54ec85..9768407f98 100644 --- a/src/OSD/OSD_CachedFileSystem.cxx +++ b/src/OSD/OSD_CachedFileSystem.cxx @@ -39,7 +39,7 @@ Standard_Boolean OSD_CachedFileSystem::IsSupportedPath (const TCollection_AsciiS // function : IsOpenIStream // purpose : //======================================================================= -Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const std::shared_ptr& theStream) const { return myLinkedFS->IsOpenIStream (theStream); } @@ -48,7 +48,7 @@ Standard_Boolean OSD_CachedFileSystem::IsOpenIStream (const opencascade::std::sh // function : IsOpenOStream // purpose : //======================================================================= -Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const std::shared_ptr& theStream) const { return myLinkedFS->IsOpenOStream (theStream); } @@ -57,10 +57,10 @@ Standard_Boolean OSD_CachedFileSystem::IsOpenOStream (const opencascade::std::sh // function : OpenIStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_CachedFileSystem::OpenIStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theParams, - const int64_t theOffset, - const opencascade::std::shared_ptr& /*theOldStream*/) +std::shared_ptr OSD_CachedFileSystem::OpenIStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theParams, + const int64_t theOffset, + const std::shared_ptr& /*theOldStream*/) { if (myStream.Url != theUrl) { @@ -75,8 +75,8 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenIStream (co // function : OpenOStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) +std::shared_ptr OSD_CachedFileSystem::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) { return myLinkedFS->OpenOStream (theUrl, theMode); } @@ -85,10 +85,10 @@ opencascade::std::shared_ptr OSD_CachedFileSystem::OpenOStream (co // function : OpenStreamBuffer // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_CachedFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - int64_t* theOutBufSize) +std::shared_ptr OSD_CachedFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + int64_t* theOutBufSize) { if ((theMode & std::ios::out) == std::ios::out) { diff --git a/src/OSD/OSD_CachedFileSystem.hxx b/src/OSD/OSD_CachedFileSystem.hxx index 170edcf7a9..278f762183 100644 --- a/src/OSD/OSD_CachedFileSystem.hxx +++ b/src/OSD/OSD_CachedFileSystem.hxx @@ -38,24 +38,24 @@ public: Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE; //! Returns TRUE if current input stream is opened for reading operations. - Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Returns TRUE if current output stream is opened for writing operations. - Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Opens stream for specified file URL for reading operations or returns previously created stream pointing to the same URL. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream + Standard_EXPORT virtual std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theParams, const int64_t theOffset, - const opencascade::std::shared_ptr& theOldStream) Standard_OVERRIDE; + const std::shared_ptr& theOldStream) Standard_OVERRIDE; //! Opens stream for specified file URL for writing operations (std::ostream) by calling parent's method. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) Standard_OVERRIDE; + Standard_EXPORT virtual std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) Standard_OVERRIDE; //! Opens stream buffer for specified file URL. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer + Standard_EXPORT virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, @@ -66,9 +66,9 @@ protected: // Auxiliary structure to save shared stream with path to it. struct OSD_CachedStream { - TCollection_AsciiString Url; - opencascade::std::shared_ptr Stream; - opencascade::std::shared_ptr StreamBuf; + TCollection_AsciiString Url; + std::shared_ptr Stream; + std::shared_ptr StreamBuf; void Reset() { diff --git a/src/OSD/OSD_FileSystem.cxx b/src/OSD/OSD_FileSystem.cxx index ccb0a25c48..6c2b67237d 100644 --- a/src/OSD/OSD_FileSystem.cxx +++ b/src/OSD/OSD_FileSystem.cxx @@ -78,15 +78,15 @@ void OSD_FileSystem::RemoveDefaultProtocol (const Handle(OSD_FileSystem)& theFil // function : openIStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystem::OpenIStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - const opencascade::std::shared_ptr& theOldStream) +std::shared_ptr OSD_FileSystem::OpenIStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + const std::shared_ptr& theOldStream) { Standard_ASSERT_RAISE (theOffset >= -1, "Incorrect negative stream position during stream opening"); - opencascade::std::shared_ptr aNewStream; - opencascade::std::shared_ptr anOldStream = opencascade::std::dynamic_pointer_cast (theOldStream); + std::shared_ptr aNewStream; + std::shared_ptr anOldStream = std::dynamic_pointer_cast (theOldStream); if (anOldStream.get() != NULL && theUrl.IsEqual (anOldStream->Url().c_str()) && IsOpenIStream (anOldStream)) @@ -104,10 +104,10 @@ opencascade::std::shared_ptr OSD_FileSystem::OpenIStream (const TC } if (aNewStream.get() == NULL) { - opencascade::std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::in); + std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::in); if (aFileBuf.get() == NULL) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } aNewStream.reset (new OSD_IStreamBuffer (theUrl.ToCString(), aFileBuf)); @@ -123,14 +123,14 @@ opencascade::std::shared_ptr OSD_FileSystem::OpenIStream (const TC // function : OpenOStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystem::OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) +std::shared_ptr OSD_FileSystem::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) { - opencascade::std::shared_ptr aNewStream; - opencascade::std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::out); + std::shared_ptr aNewStream; + std::shared_ptr aFileBuf = OpenStreamBuffer (theUrl, theMode | std::ios_base::out); if (aFileBuf.get() == NULL) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } aNewStream.reset(new OSD_OStreamBuffer (theUrl.ToCString(), aFileBuf)); diff --git a/src/OSD/OSD_FileSystem.hxx b/src/OSD/OSD_FileSystem.hxx index f741dc09a9..d88f91f74d 100644 --- a/src/OSD/OSD_FileSystem.hxx +++ b/src/OSD/OSD_FileSystem.hxx @@ -42,10 +42,10 @@ public: virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const = 0; //! Returns TRUE if current input stream is opened for reading operations. - virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const = 0; + virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const = 0; //! Returns TRUE if current output stream is opened for writing operations. - virtual Standard_Boolean IsOpenOStream(const opencascade::std::shared_ptr& theStream) const = 0; + virtual Standard_Boolean IsOpenOStream(const std::shared_ptr& theStream) const = 0; //! Opens stream for specified file URL for reading operations (std::istream). //! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer(). @@ -55,19 +55,19 @@ public: //! -1 would keep seek position undefined (in case of re-using theOldStream) //! @param theOldStream [in] a pointer to existing stream pointing to theUrl to be reused (without re-opening) //! @return pointer to newly created opened stream, to theOldStream if it can be reused or NULL in case of failure. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream + Standard_EXPORT virtual std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, - const opencascade::std::shared_ptr& theOldStream = opencascade::std::shared_ptr()); + const std::shared_ptr& theOldStream = std::shared_ptr()); //! Opens stream for specified file URL for writing operations (std::ostream). //! Default implementation create a stream from file buffer returned by OSD_FileSystem::OpenFileBuffer(). //! @param theUrl [in] path to open //! @param theMode [in] flags describing the requested output mode for the stream (std::ios_base::out will be implicitly added) //! @return pointer to newly created opened stream or NULL in case of failure. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode); + Standard_EXPORT virtual std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode); //! Opens stream buffer for specified file URL. //! @param theUrl [in] path to open @@ -75,10 +75,10 @@ public: //! @param theOffset [in] expected stream position from the beginning of the buffer (beginning of the stream buffer by default) //! @param theOutBufSize [out] total buffer size (only if buffer is opened for read) //! @return pointer to newly created opened stream buffer or NULL in case of failure. - virtual opencascade::std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset = 0, - int64_t* theOutBufSize = NULL) = 0; + virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset = 0, + int64_t* theOutBufSize = NULL) = 0; //! Constructor. Standard_EXPORT OSD_FileSystem(); diff --git a/src/OSD/OSD_FileSystemSelector.cxx b/src/OSD/OSD_FileSystemSelector.cxx index 0733ecb276..8c7be8c1e3 100644 --- a/src/OSD/OSD_FileSystemSelector.cxx +++ b/src/OSD/OSD_FileSystemSelector.cxx @@ -61,9 +61,9 @@ Standard_Boolean OSD_FileSystemSelector::IsSupportedPath (const TCollection_Asci // function : IsOpenIStream // purpose : //======================================================================= -Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -86,9 +86,9 @@ Standard_Boolean OSD_FileSystemSelector::IsOpenIStream (const opencascade::std:: // function : IsOpenOStream // purpose : //======================================================================= -Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -111,68 +111,68 @@ Standard_Boolean OSD_FileSystemSelector::IsOpenOStream (const opencascade::std:: // function : OpenIStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystemSelector::OpenIStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - const opencascade::std::shared_ptr& theOldStream) +std::shared_ptr OSD_FileSystemSelector::OpenIStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + const std::shared_ptr& theOldStream) { for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) { const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); if (aFileSystem->IsSupportedPath (theUrl)) { - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (theUrl, theMode, theOffset, theOldStream); + std::shared_ptr aStream = aFileSystem->OpenIStream (theUrl, theMode, theOffset, theOldStream); if (aStream.get() != NULL) { return aStream; } } } - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } //======================================================================= // function : OpenOStream // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystemSelector::OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) +std::shared_ptr OSD_FileSystemSelector::OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) { for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) { const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); if (aFileSystem->IsSupportedPath (theUrl)) { - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (theUrl, theMode); + std::shared_ptr aStream = aFileSystem->OpenOStream (theUrl, theMode); if (aStream.get() != NULL) { return aStream; } } } - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } //======================================================================= // function : OpenStreamBuffer // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_FileSystemSelector::OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - int64_t* theOutBufSize) +std::shared_ptr OSD_FileSystemSelector::OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + int64_t* theOutBufSize) { for (NCollection_List::Iterator aProtIter (myProtocols); aProtIter.More(); aProtIter.Next()) { const Handle(OSD_FileSystem)& aFileSystem = aProtIter.Value(); if (aFileSystem->IsSupportedPath (theUrl)) { - opencascade::std::shared_ptr aBuf = aFileSystem->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); + std::shared_ptr aBuf = aFileSystem->OpenStreamBuffer (theUrl, theMode, theOffset, theOutBufSize); if (aBuf.get() != NULL) { return aBuf; } } } - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } diff --git a/src/OSD/OSD_FileSystemSelector.hxx b/src/OSD/OSD_FileSystemSelector.hxx index 89777f4175..7ccaf949fc 100644 --- a/src/OSD/OSD_FileSystemSelector.hxx +++ b/src/OSD/OSD_FileSystemSelector.hxx @@ -41,24 +41,24 @@ public: Standard_EXPORT virtual bool IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE; //! Returns TRUE if current input stream is opened for reading operations. - Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Returns TRUE if current output stream is opened for writing operations. - Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Opens input stream using one of registered protocols. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenIStream + Standard_EXPORT virtual std::shared_ptr OpenIStream (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, - const opencascade::std::shared_ptr& theOldStream = opencascade::std::shared_ptr()) Standard_OVERRIDE; + const std::shared_ptr& theOldStream = std::shared_ptr()) Standard_OVERRIDE; //! Opens output stream using one of registered protocols. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode) Standard_OVERRIDE; + Standard_EXPORT virtual std::shared_ptr OpenOStream (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode) Standard_OVERRIDE; //! Opens stream buffer using one of registered protocols. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer + Standard_EXPORT virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, diff --git a/src/OSD/OSD_LocalFileSystem.cxx b/src/OSD/OSD_LocalFileSystem.cxx index 2666bc1d13..68fa6aded6 100644 --- a/src/OSD/OSD_LocalFileSystem.cxx +++ b/src/OSD/OSD_LocalFileSystem.cxx @@ -31,9 +31,9 @@ Standard_Boolean OSD_LocalFileSystem::IsSupportedPath (const TCollection_AsciiSt // function : IsOpenIStream // purpose : //======================================================================= -Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -46,9 +46,9 @@ Standard_Boolean OSD_LocalFileSystem::IsOpenIStream (const opencascade::std::sha // function : IsOpenOStream // purpose : //======================================================================= -Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const opencascade::std::shared_ptr& theStream) const +Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const std::shared_ptr& theStream) const { - opencascade::std::shared_ptr aFileStream = opencascade::std::dynamic_pointer_cast (theStream); + std::shared_ptr aFileStream = std::dynamic_pointer_cast (theStream); if (aFileStream.get() == NULL) { return false; @@ -61,16 +61,16 @@ Standard_Boolean OSD_LocalFileSystem::IsOpenOStream (const opencascade::std::sha // function : OpenStreamBuffer // purpose : //======================================================================= -opencascade::std::shared_ptr OSD_LocalFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, - const std::ios_base::openmode theMode, - const int64_t theOffset, - int64_t* theOutBufSize) +std::shared_ptr OSD_LocalFileSystem::OpenStreamBuffer (const TCollection_AsciiString& theUrl, + const std::ios_base::openmode theMode, + const int64_t theOffset, + int64_t* theOutBufSize) { Standard_ASSERT_RAISE (theOffset >= 0, "Incorrect negative stream position during stream buffer opening"); - opencascade::std::shared_ptr aNewBuf(new std::filebuf()); + std::shared_ptr aNewBuf(new std::filebuf()); if (!OSD_OpenStream (*aNewBuf, TCollection_ExtendedString(theUrl), theMode)) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } // if buffer is opened for read, find the file size if (theOutBufSize && ((theMode & std::ios::in) != 0)) @@ -79,13 +79,13 @@ opencascade::std::shared_ptr OSD_LocalFileSystem::OpenStreamBuff if (aNewBuf->pubseekoff ((std::streamoff )theOffset, std::ios_base::beg, std::ios_base::in) < 0) { *theOutBufSize = 0; - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } } else if (theOffset > 0 && aNewBuf->pubseekoff ((std::streamoff )theOffset, std::ios_base::beg, (theMode & std::ios::in) != 0 ? std::ios_base::in : std::ios_base::out) < 0) { - return opencascade::std::shared_ptr(); + return std::shared_ptr(); } return aNewBuf; } diff --git a/src/OSD/OSD_LocalFileSystem.hxx b/src/OSD/OSD_LocalFileSystem.hxx index fbe2db9545..2589f9978c 100644 --- a/src/OSD/OSD_LocalFileSystem.hxx +++ b/src/OSD/OSD_LocalFileSystem.hxx @@ -29,13 +29,13 @@ public: Standard_EXPORT virtual Standard_Boolean IsSupportedPath (const TCollection_AsciiString& theUrl) const Standard_OVERRIDE; //! Returns TRUE if current input stream is opened for reading operations. - Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenIStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Returns TRUE if current output stream is opened for writing operations. - Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const opencascade::std::shared_ptr& theStream) const Standard_OVERRIDE; + Standard_EXPORT virtual Standard_Boolean IsOpenOStream (const std::shared_ptr& theStream) const Standard_OVERRIDE; //! Opens stream buffer for specified file URL. - Standard_EXPORT virtual opencascade::std::shared_ptr OpenStreamBuffer + Standard_EXPORT virtual std::shared_ptr OpenStreamBuffer (const TCollection_AsciiString& theUrl, const std::ios_base::openmode theMode, const int64_t theOffset = 0, diff --git a/src/OSD/OSD_Parallel.hxx b/src/OSD/OSD_Parallel.hxx index 0900cd4dff..b3dd8d0d47 100644 --- a/src/OSD/OSD_Parallel.hxx +++ b/src/OSD/OSD_Parallel.hxx @@ -179,11 +179,7 @@ protected: } private: -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - std::auto_ptr myPtr; -#else std::unique_ptr myPtr; -#endif }; //! Interface class representing functor object. diff --git a/src/OSD/OSD_StreamBuffer.hxx b/src/OSD/OSD_StreamBuffer.hxx index 59836e68ac..97915a67f5 100644 --- a/src/OSD/OSD_StreamBuffer.hxx +++ b/src/OSD/OSD_StreamBuffer.hxx @@ -29,7 +29,7 @@ public: //! Main constructor. OSD_StreamBuffer (const std::string& theUrl, - const opencascade::std::shared_ptr& theBuffer) + const std::shared_ptr& theBuffer) : T (theBuffer.get()), myUrl (theUrl), myBuffer (theBuffer) {} //! Return an opened URL. @@ -37,8 +37,8 @@ public: protected: - std::string myUrl; - opencascade::std::shared_ptr myBuffer; + std::string myUrl; + std::shared_ptr myBuffer; }; typedef OSD_StreamBuffer OSD_IStreamBuffer; diff --git a/src/Poly/Poly_ArrayOfNodes.hxx b/src/Poly/Poly_ArrayOfNodes.hxx index fda60578b7..c65b8842c9 100644 --- a/src/Poly/Poly_ArrayOfNodes.hxx +++ b/src/Poly/Poly_ArrayOfNodes.hxx @@ -84,7 +84,6 @@ public: //! Assignment operator; @sa Assign() Poly_ArrayOfNodes& operator= (const Poly_ArrayOfNodes& theOther) { return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther) : NCollection_AliasedArray (std::move (theOther)) @@ -97,7 +96,6 @@ public: { return Move (theOther); } -#endif public: diff --git a/src/Poly/Poly_ArrayOfUVNodes.hxx b/src/Poly/Poly_ArrayOfUVNodes.hxx index 7ce3a10d18..8ec30bc466 100644 --- a/src/Poly/Poly_ArrayOfUVNodes.hxx +++ b/src/Poly/Poly_ArrayOfUVNodes.hxx @@ -84,7 +84,6 @@ public: //! Assignment operator; @sa Assign() Poly_ArrayOfUVNodes& operator= (const Poly_ArrayOfUVNodes& theOther) { return Assign (theOther); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther) : NCollection_AliasedArray (std::move (theOther)) @@ -97,7 +96,6 @@ public: { return Move (theOther); } -#endif public: diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index 670bb8e401..b15836c6f4 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -460,7 +460,7 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs else { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (anImgPath, std::ios::in | std::ios::binary); if (aFile.get() == NULL) { std::cout << "Syntax error: image file '" << anImgPath << "' cannot be found\n"; diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 5a7648de1e..46df73de95 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -2758,7 +2758,7 @@ static Standard_Integer OCC29935(Draw_Interpretor& , // Generate data; Standard_Integer aSize = Draw::Atoi (theArgv[1]); - opencascade::std::mt19937 aGen (42); + std::mt19937 aGen (42); NCollection_Array2 aMat1 (0, aSize - 1, 0, aSize - 1); NCollection_Array2 aMat2 (0, aSize - 1, 0, aSize - 1); NCollection_Array2 aMatResRef(0, aSize - 1, 0, aSize - 1); diff --git a/src/QABugs/QABugs_20.cxx b/src/QABugs/QABugs_20.cxx index ece17e6ebe..4647e76614 100644 --- a/src/QABugs/QABugs_20.cxx +++ b/src/QABugs/QABugs_20.cxx @@ -2408,7 +2408,7 @@ static Standard_Integer OCC28887 (Draw_Interpretor&, Standard_Integer theNbArgs, Handle(NCollection_Buffer) aBuffer; { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (aFilePath, std::ios::binary | std::ios::in); + std::shared_ptr aFile = aFileSystem->OpenIStream (aFilePath, std::ios::binary | std::ios::in); if (aFile.get() == NULL) { std::cout << "Error: input file '" << aFilePath << "' cannot be read\n"; diff --git a/src/QANCollection/QANCollection_Handle.cxx b/src/QANCollection/QANCollection_Handle.cxx index 829e3b0418..7be8ef597b 100644 --- a/src/QANCollection/QANCollection_Handle.cxx +++ b/src/QANCollection/QANCollection_Handle.cxx @@ -463,7 +463,7 @@ static Standard_Integer QAHandleInc (Draw_Interpretor& theDI, } Handle(Standard_Transient) aHandle = new Standard_Transient(); - opencascade::std::shared_ptr aSharePtr (new Standard_Transient()); + std::shared_ptr aSharePtr (new Standard_Transient()); theDI << "Time of creating and destroying " << aNbIters << " smart pointers to the same object, per item, ns:"; { { @@ -479,7 +479,7 @@ static Standard_Integer QAHandleInc (Draw_Interpretor& theDI, { QATimer aTimer (theDI, "\nC++ shared_ptr: ", QATimer::ns, aNbIters); { - std::vector< opencascade::std::shared_ptr > aSharePointers (aNbIters); + std::vector< std::shared_ptr > aSharePointers (aNbIters); for (Standard_Integer anIter = 0; anIter < aNbIters; ++anIter) { aSharePointers[anIter] = aSharePtr; diff --git a/src/RWGltf/RWGltf_CafReader.cxx b/src/RWGltf/RWGltf_CafReader.cxx index c53b59b11a..af23af338e 100644 --- a/src/RWGltf/RWGltf_CafReader.cxx +++ b/src/RWGltf/RWGltf_CafReader.cxx @@ -191,7 +191,7 @@ Standard_Boolean RWGltf_CafReader::performMesh (const TCollection_AsciiString& t aPSentry.Show(); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aFile = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); if (aFile.get() == NULL || !aFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + theFile + "' is not found"); diff --git a/src/RWGltf/RWGltf_CafWriter.cxx b/src/RWGltf/RWGltf_CafWriter.cxx index 301c866674..5e0c8cf0ba 100644 --- a/src/RWGltf/RWGltf_CafWriter.cxx +++ b/src/RWGltf/RWGltf_CafWriter.cxx @@ -400,7 +400,7 @@ bool RWGltf_CafWriter::writeBinData (const Handle(TDocStd_Document)& theDocument myBinDataLen64 = 0; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary); + std::shared_ptr aBinFile = aFileSystem->OpenOStream (myBinFileNameFull, std::ios::out | std::ios::binary); if (aBinFile.get() == NULL || !aBinFile->good()) { @@ -707,7 +707,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, const TCollection_AsciiString aFileNameGltf = myFile; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aGltfContentFile = aFileSystem->OpenOStream (aFileNameGltf, std::ios::out | std::ios::binary); + std::shared_ptr aGltfContentFile = aFileSystem->OpenOStream (aFileNameGltf, std::ios::out | std::ios::binary); if (aGltfContentFile.get() == NULL || !aGltfContentFile->good()) { @@ -827,7 +827,7 @@ bool RWGltf_CafWriter::writeJson (const Handle(TDocStd_Document)& theDocument, if (aFullLen64 < std::numeric_limits::max()) { { - opencascade::std::shared_ptr aBinFile = aFileSystem->OpenIStream (myBinFileNameFull, std::ios::in | std::ios::binary); + std::shared_ptr aBinFile = aFileSystem->OpenIStream (myBinFileNameFull, std::ios::in | std::ios::binary); if (aBinFile.get() == NULL || !aBinFile->good()) { Message::SendFail (TCollection_AsciiString ("File '") + myBinFileNameFull + "' cannot be opened"); diff --git a/src/RWGltf/RWGltf_CafWriter.hxx b/src/RWGltf/RWGltf_CafWriter.hxx index 328c1b7a94..6e8b976733 100644 --- a/src/RWGltf/RWGltf_CafWriter.hxx +++ b/src/RWGltf/RWGltf_CafWriter.hxx @@ -360,8 +360,7 @@ protected: RWMesh_CoordinateSystemConverter myCSTrsf; //!< transformation from OCCT to glTF coordinate system XCAFPrs_Style myDefaultStyle; //!< default material definition to be used for nodes with only color defined - opencascade::std::shared_ptr - myWriter; //!< JSON writer + std::shared_ptr myWriter; //!< JSON writer Handle(RWGltf_GltfMaterialMap) myMaterialMap; //!< map of defined materials RWGltf_GltfBufferView myBuffViewPos; //!< current buffer view with nodes positions RWGltf_GltfBufferView myBuffViewNorm; //!< current buffer view with nodes normals diff --git a/src/RWGltf/RWGltf_TriangulationReader.cxx b/src/RWGltf/RWGltf_TriangulationReader.cxx index 44dba18774..16ad9b9fa6 100644 --- a/src/RWGltf/RWGltf_TriangulationReader.cxx +++ b/src/RWGltf/RWGltf_TriangulationReader.cxx @@ -154,7 +154,7 @@ bool RWGltf_TriangulationReader::readFileData (const Handle(RWGltf_GltfLatePrimi const Handle(OSD_FileSystem)& theFileSystem) const { const Handle(OSD_FileSystem)& aFileSystem = !theFileSystem.IsNull() ? theFileSystem : OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aSharedStream = aFileSystem->OpenIStream + std::shared_ptr aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); if (aSharedStream.get() == NULL) { @@ -215,7 +215,7 @@ bool RWGltf_TriangulationReader::readDracoBuffer (const Handle(RWGltf_GltfLatePr { const TCollection_AsciiString& aName = theSourceGltfMesh->Id(); const Handle(OSD_FileSystem)& aFileSystem = !theFileSystem.IsNull() ? theFileSystem : OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); + std::shared_ptr aSharedStream = aFileSystem->OpenIStream (theGltfData.StreamUri, std::ios::in | std::ios::binary, theGltfData.StreamOffset); if (aSharedStream.get() == NULL) { reportError (TCollection_AsciiString("Buffer '") + aName + "' refers to invalid file '" + theGltfData.StreamUri + "'."); diff --git a/src/RWStl/RWStl.cxx b/src/RWStl/RWStl.cxx index 7febb29540..8b703f443e 100644 --- a/src/RWStl/RWStl.cxx +++ b/src/RWStl/RWStl.cxx @@ -157,7 +157,7 @@ Handle(Poly_Triangulation) RWStl::ReadBinary (const OSD_Path& theFile, theFile.SystemName (aPath); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); if (aStream.get() == NULL) { return Handle(Poly_Triangulation)(); diff --git a/src/RWStl/RWStl_Reader.cxx b/src/RWStl/RWStl_Reader.cxx index 85dc4f7b4d..eb6ad7c1c7 100644 --- a/src/RWStl/RWStl_Reader.cxx +++ b/src/RWStl/RWStl_Reader.cxx @@ -140,7 +140,7 @@ Standard_Boolean RWStl_Reader::Read (const char* theFile, const Message_ProgressRange& theProgress) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); + std::shared_ptr aStream = aFileSystem->OpenIStream (theFile, std::ios::in | std::ios::binary); if (aStream.get() == NULL) { Message::SendFail (TCollection_AsciiString("Error: file '") + theFile + "' is not found"); diff --git a/src/Standard/Standard_Handle.hxx b/src/Standard/Standard_Handle.hxx index 8b6694e66c..763f83a997 100644 --- a/src/Standard/Standard_Handle.hxx +++ b/src/Standard/Standard_Handle.hxx @@ -70,13 +70,11 @@ namespace opencascade { BeginScope(); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor handle (handle&& theHandle) : entity(theHandle.entity) { theHandle.entity = 0; } -#endif //! Destructor ~handle () @@ -113,14 +111,12 @@ namespace opencascade { return *this; } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move operator handle& operator= (handle&& theHandle) { std::swap (this->entity, theHandle.entity); return *this; } -#endif //! STL-like cast to pointer to referred object (note non-const). //! @sa std::shared_ptr::get() @@ -307,7 +303,6 @@ namespace opencascade { BeginScope(); } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Generalized move constructor template handle (handle&& theHandle, typename std::enable_if ::value>::type* = nullptr) @@ -315,7 +310,6 @@ namespace opencascade { { theHandle.entity = 0; } -#endif //! Generalized assignment operator. template @@ -327,7 +321,6 @@ namespace opencascade { return *this; } -#ifndef OCCT_NO_RVALUE_REFERENCE //! Generalized move operator template handle& operator= (handle&& theHandle) @@ -337,7 +330,6 @@ namespace opencascade { std::swap (this->entity, theHandle.entity); return *this; } -#endif #else diff --git a/src/Standard/Standard_Macro.hxx b/src/Standard/Standard_Macro.hxx index b634410eb3..a2f949d357 100644 --- a/src/Standard/Standard_Macro.hxx +++ b/src/Standard/Standard_Macro.hxx @@ -20,13 +20,17 @@ #ifndef _Standard_Macro_HeaderFile # define _Standard_Macro_HeaderFile +#if defined(_MSC_VER) && (_MSC_VER < 1600) + #error C++11 compatible compiler is required (Visual Studio 2010 or newer) +#endif + //! @def Standard_OVERRIDE //! Should be used in declarations of virtual methods overridden in the //! derived classes, to cause compilation error in the case if that virtual //! function disappears or changes its signature in the base class. //! //! Expands to C++11 keyword "override" on compilers that are known to -//! suppot it; empty in other cases. +//! support it; empty in other cases. #if defined(__cplusplus) && (__cplusplus >= 201100L) // part of C++11 standard #define Standard_OVERRIDE override @@ -183,13 +187,6 @@ #define Standard_ENABLE_DEPRECATION_WARNINGS #endif -//! @def OCCT_NO_RVALUE_REFERENCE -//! Disables methods and constructors that use rvalue references -//! (C++11 move semantics) not supported by obsolete compilers. -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - #define OCCT_NO_RVALUE_REFERENCE -#endif - # ifdef _WIN32 // We must be careful including windows.h: it is really poisonous stuff! diff --git a/src/Standard/Standard_Std.hxx b/src/Standard/Standard_Std.hxx index db925b0c20..4a8d9921da 100644 --- a/src/Standard/Standard_Std.hxx +++ b/src/Standard/Standard_Std.hxx @@ -33,37 +33,6 @@ namespace opencascade // import all available standard stuff from std namespace using namespace ::std; -// for old MSVC compiler, some standard templates are defined in std::tr1 namespace, -// and some missing ones are implemented here -#if (defined(_MSC_VER) && (_MSC_VER < 1600)) - using namespace ::std::tr1; - - // C++11 template class enable_if - template - struct enable_if - { // type is undefined for assumed !_Test - }; - - template - struct enable_if - { // type is _Type for _Test - typedef _Type type; - }; - - template - struct conditional - { - typedef TypeTrue type; - }; - - template - struct conditional - { - typedef TypeFalse type; - }; - -#endif - } // namespace std //! Trait yielding true if class T1 is base of T2 but not the same diff --git a/src/Standard/Standard_Type.hxx b/src/Standard/Standard_Type.hxx index 9fcdf55426..65b6826a81 100644 --- a/src/Standard/Standard_Type.hxx +++ b/src/Standard/Standard_Type.hxx @@ -63,11 +63,6 @@ namespace opencascade static_assert(opencascade::has_type::type::value, "OCCT RTTI definition is incorrect: " #Base " is not direct base class of " #Class); \ static_assert(&get_type_name == &Class::get_type_name, "OCCT RTTI definition is misplaced: current class is not " #Class); -#elif (defined(_MSC_VER) && (_MSC_VER < 1600)) - -// VC9 does not support static_assert and decltype at all -#define OCCT_CHECK_BASE_CLASS(Class,Base) - #elif (defined(_MSC_VER) && (_MSC_VER >= 1900)) // VC14+ allow using address of member functions in static checks, diff --git a/src/Standard/Standard_TypeDef.hxx b/src/Standard/Standard_TypeDef.hxx index 5d452394cf..81d6e5f1e1 100755 --- a/src/Standard/Standard_TypeDef.hxx +++ b/src/Standard/Standard_TypeDef.hxx @@ -18,21 +18,7 @@ #include #include -// VC9 does not have stdint.h -#if(defined(_MSC_VER) && (_MSC_VER < 1600)) - // old MSVC - hasn't stdint header - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int64 uint64_t; - - typedef signed __int8 int8_t; - typedef signed __int16 int16_t; - typedef signed __int32 int32_t; - typedef signed __int64 int64_t; -#else - #include -#endif +#include #if(defined(_MSC_VER) && (_MSC_VER < 1800)) // only Visual Studio 2013 (vc12) provides header diff --git a/src/StepSelect/StepSelect_WorkLibrary.cxx b/src/StepSelect/StepSelect_WorkLibrary.cxx index a7a99ded57..6f672e13e3 100644 --- a/src/StepSelect/StepSelect_WorkLibrary.cxx +++ b/src/StepSelect/StepSelect_WorkLibrary.cxx @@ -99,7 +99,7 @@ Standard_Boolean StepSelect_WorkLibrary::WriteFile if (stepmodel.IsNull() || stepro.IsNull()) return Standard_False; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc); + std::shared_ptr aStream = aFileSystem->OpenOStream (ctx.FileName(), std::ios::out | std::ios::trunc); if (aStream.get() == NULL) { ctx.CCheck(0)->AddFail("Step File could not be created"); diff --git a/src/TCollection/TCollection_AsciiString.hxx b/src/TCollection/TCollection_AsciiString.hxx index e839451ecd..8f277b1221 100644 --- a/src/TCollection/TCollection_AsciiString.hxx +++ b/src/TCollection/TCollection_AsciiString.hxx @@ -76,7 +76,6 @@ public: //! Initializes a AsciiString with another AsciiString. Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor TCollection_AsciiString (TCollection_AsciiString&& theOther) : mystring (theOther.mystring), @@ -85,7 +84,6 @@ public: theOther.mystring = NULL; theOther.mylength = 0; } -#endif //! Initializes a AsciiString with copy of another AsciiString //! concatenated with the message character. @@ -280,10 +278,8 @@ void operator = (const TCollection_AsciiString& fromwhere) //! Exchange the data of two strings (without reallocating memory). Standard_EXPORT void Swap (TCollection_AsciiString& theOther); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) { Swap (theOther); return *this; } -#endif //! Frees memory allocated by AsciiString. Standard_EXPORT ~TCollection_AsciiString(); diff --git a/src/TCollection/TCollection_ExtendedString.hxx b/src/TCollection/TCollection_ExtendedString.hxx index 0bd0ed4351..899eecd7f9 100644 --- a/src/TCollection/TCollection_ExtendedString.hxx +++ b/src/TCollection/TCollection_ExtendedString.hxx @@ -97,7 +97,6 @@ public: //! Initializes a ExtendedString with another ExtendedString. Standard_EXPORT TCollection_ExtendedString(const TCollection_ExtendedString& astring); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move constructor TCollection_ExtendedString (TCollection_ExtendedString&& theOther) : mystring (theOther.mystring), @@ -106,7 +105,6 @@ public: theOther.mystring = NULL; theOther.mylength = 0; } -#endif //! Creation by converting an Ascii string to an extended //! string. The string is treated as having UTF-8 coding. @@ -154,10 +152,8 @@ void operator = (const TCollection_ExtendedString& fromwhere) //! Exchange the data of two strings (without reallocating memory). Standard_EXPORT void Swap (TCollection_ExtendedString& theOther); -#ifndef OCCT_NO_RVALUE_REFERENCE //! Move assignment operator TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) { Swap (theOther); return *this; } -#endif //! Frees memory allocated by ExtendedString. Standard_EXPORT ~TCollection_ExtendedString(); diff --git a/src/TObjDRAW/TObjDRAW.cxx b/src/TObjDRAW/TObjDRAW.cxx index af3e257146..e26c991474 100644 --- a/src/TObjDRAW/TObjDRAW.cxx +++ b/src/TObjDRAW/TObjDRAW.cxx @@ -208,7 +208,7 @@ static Standard_Integer saveModel (Draw_Interpretor& di, Standard_Integer argc, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (argv[2], std::ios::out | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenOStream (argv[2], std::ios::out | std::ios::binary); isSaved = aModel->SaveAs (*aFileStream); } else @@ -252,7 +252,7 @@ static Standard_Integer loadModel (Draw_Interpretor& di, Standard_Integer argc, if (anUseStream) { const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (aPath, std::ios::in | std::ios::binary); isLoaded = aModel->Load (*aFileStream); } else diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.hxx b/src/TopLoc/TopLoc_SListOfItemLocation.hxx index a8c136c774..ce6b3d356d 100644 --- a/src/TopLoc/TopLoc_SListOfItemLocation.hxx +++ b/src/TopLoc/TopLoc_SListOfItemLocation.hxx @@ -69,8 +69,6 @@ public: return Assign(Other); } -#ifndef OCCT_NO_RVALUE_REFERENCE - //! Move constructor TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther) : myNode(std::move (theOther.myNode)) @@ -84,8 +82,6 @@ public: return *this; } -#endif - //! Returne true if this list is empty Standard_Boolean IsEmpty() const { diff --git a/src/TopoDS/TopoDS_Shape.hxx b/src/TopoDS/TopoDS_Shape.hxx index be92f62837..4106967b07 100644 --- a/src/TopoDS/TopoDS_Shape.hxx +++ b/src/TopoDS/TopoDS_Shape.hxx @@ -48,8 +48,6 @@ public: //! Creates a NULL Shape referring to nothing. TopoDS_Shape() : myOrient (TopAbs_EXTERNAL) {} -#ifndef OCCT_NO_RVALUE_REFERENCE - //! Generalized move constructor, accepting also sub-classes //! (TopoDS_Shape hierarchy declares only fake sub-classes with no extra fields). template @@ -71,8 +69,6 @@ public: return *this; } -#endif - //! Returns true if this shape is null. In other words, it //! references no underlying shape with the potential to //! be given a location and an orientation. diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index 7f4af79439..8fbd807047 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -638,7 +638,7 @@ static Standard_Integer VListMaterials (Draw_Interpretor& theDI, }; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aMatFile, anObjFile, aHtmlFile; + std::shared_ptr aMatFile, anObjFile, aHtmlFile; if (aDumpFile.EndsWith (".obj") || aDumpFile.EndsWith (".mtl")) { @@ -894,7 +894,7 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, } const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aHtmlFile; + std::shared_ptr aHtmlFile; TCollection_AsciiString aFileNameBase, aFolder; if (aDumpFile.EndsWith (".htm") || aDumpFile.EndsWith (".html")) @@ -1088,7 +1088,7 @@ static Standard_Integer VGenEnvLUT (Draw_Interpretor&, } const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFile = aFileSystem->OpenOStream (aFilePath, std::ios::out | std::ios::trunc); + std::shared_ptr aFile = aFileSystem->OpenOStream (aFilePath, std::ios::out | std::ios::trunc); if (aFile.get() == NULL || !aFile->good()) { diff --git a/src/VrmlAPI/VrmlAPI_Writer.cxx b/src/VrmlAPI/VrmlAPI_Writer.cxx index 9b884a0d38..0275a949de 100644 --- a/src/VrmlAPI/VrmlAPI_Writer.cxx +++ b/src/VrmlAPI/VrmlAPI_Writer.cxx @@ -226,7 +226,7 @@ Standard_Boolean VrmlAPI_Writer::write_v1(const TopoDS_Shape& aShape,const Stand OSD_Path thePath(aFile); TCollection_AsciiString theFile;thePath.SystemName(theFile); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr anOutFile = aFileSystem->OpenOStream (theFile, std::ios::out); if (anOutFile.get() == NULL) { return Standard_False; @@ -370,7 +370,7 @@ Standard_Boolean VrmlAPI_Writer::write_v2(const TopoDS_Shape& aShape,const Stand aConv.Convert(anExtFace, anExtEdge); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out); + std::shared_ptr anOutStream = aFileSystem->OpenOStream (aFile, std::ios::out); if (anOutStream.get() != NULL) { *anOutStream << aScene; @@ -395,7 +395,7 @@ Standard_Boolean VrmlAPI_Writer::WriteDoc( aConv.ConvertDocument(theDoc); const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out); + std::shared_ptr anOutStream = aFileSystem->OpenOStream (theFile, std::ios::out); if (anOutStream.get() != NULL) { *anOutStream << aScene; diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx index b931737026..96f4bad242 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentRetrievalDriver.cxx @@ -176,7 +176,7 @@ void XmlLDrivers_DocumentRetrievalDriver::Read myFileName = theFileName; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenIStream (myFileName, std::ios::in); + std::shared_ptr aFileStream = aFileSystem->OpenIStream (myFileName, std::ios::in); if (aFileStream.get() != NULL && aFileStream->good()) { diff --git a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx index f1176e6929..271d4dcdd7 100644 --- a/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx +++ b/src/XmlLDrivers/XmlLDrivers_DocumentStorageDriver.cxx @@ -99,8 +99,7 @@ void XmlLDrivers_DocumentStorageDriver::Write (const Handle(CDM_Document)& myFileName = theFileName; const Handle(OSD_FileSystem)& aFileSystem = OSD_FileSystem::DefaultFileSystem(); - opencascade::std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out); - + std::shared_ptr aFileStream = aFileSystem->OpenOStream (theFileName, std::ios::out); if (aFileStream.get() != NULL && aFileStream->good()) { Write (theDocument, *aFileStream, theRange);