mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0027111: Add generalized copy constructor in handle class for old compilers
Copy constructor and assignment operator from handle of derived type is added in handle class. They are enabled only if macro OCC_HANDLE_NOCASTS is defined, and operators of cast of handle to reference to handle to base type are disabled in that case. Useless type casts to handle to base type are removed in GC and GCE2d classes. Code returning reference to handle from function is corrected to return it either by value or as reference to handle of actual type.
This commit is contained in:
@@ -45,7 +45,7 @@ const Handle(Standard_Transient)& XmlDrivers::Factory(const Standard_GUID& theGU
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "XmlDrivers : Storage Plugin" << endl;
|
||||
#endif
|
||||
static Handle(XmlDrivers_DocumentStorageDriver) model_sd =
|
||||
static Handle(Standard_Transient) model_sd =
|
||||
new XmlDrivers_DocumentStorageDriver
|
||||
("Copyright: Open Cascade, 2001-2002"); // default copyright
|
||||
return model_sd;
|
||||
@@ -56,7 +56,7 @@ const Handle(Standard_Transient)& XmlDrivers::Factory(const Standard_GUID& theGU
|
||||
#ifdef OCCT_DEBUG
|
||||
cout << "XmlDrivers : Retrieval Plugin" << endl;
|
||||
#endif
|
||||
static Handle (XmlDrivers_DocumentRetrievalDriver) model_rd =
|
||||
static Handle (Standard_Transient) model_rd =
|
||||
new XmlDrivers_DocumentRetrievalDriver ();
|
||||
return model_rd;
|
||||
}
|
||||
|
Reference in New Issue
Block a user