mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024023: Revamp the OCCT Handle -- downcast (automatic)
Automatic update by command "occt_upgrade . -downcast" C-style cast of Handle to that of derived type (now illegal) is replaced by call to DownCast() Const reference local variables of Handle type initialized by result of DownCast are replaced by normal variables.
This commit is contained in:
@@ -71,7 +71,7 @@ Handle(Storage_Schema) PCDM::Schema(const TCollection_ExtendedString& aSchemaNam
|
||||
Standard_NoSuchObject::Raise(aMsg);
|
||||
}
|
||||
Handle(Standard_Transient) t = Plugin::Load(UTL::GUID(UTL::Value(r,aSchemaName)));
|
||||
return *((Handle(Storage_Schema)*)&t);
|
||||
return Handle(Storage_Schema)::DownCast (t);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -173,7 +173,7 @@ void PCDM_RetrievalDriver::Read(const TCollection_ExtendedString& theFileName,
|
||||
Standard_Failure::Raise(aMsg);
|
||||
}
|
||||
Handle(Standard_Persistent) theObject=theDocument->Object();
|
||||
Handle(PCDM_Document) thePDocument = *((Handle(PCDM_Document)*)&theObject);
|
||||
Handle(PCDM_Document) thePDocument = Handle(PCDM_Document)::DownCast (theObject);
|
||||
|
||||
|
||||
{
|
||||
|
Reference in New Issue
Block a user