mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-15 12:07:41 +08: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:
@@ -238,7 +238,7 @@ Handle(TDF_DeltaOnModification) TDataStd_ByteArray::DeltaOnModification
|
||||
(const Handle(TDF_Attribute)& OldAttribute) const
|
||||
{
|
||||
if(myIsDelta)
|
||||
return new TDataStd_DeltaOnModificationOfByteArray(*((Handle(TDataStd_ByteArray)*)&OldAttribute));
|
||||
return new TDataStd_DeltaOnModificationOfByteArray(Handle(TDataStd_ByteArray)::DownCast (OldAttribute));
|
||||
else return new TDF_DefaultDeltaOnModification(OldAttribute);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user