0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / Units / Units_UnitsDictionary.cxx
index 1ad280e..d3d75e6 100644 (file)
@@ -267,7 +267,7 @@ void Units_UnitsDictionary::Creates(const Standard_CString afilename)
         if(move) {
           Standard_Integer last = theunitssequence->Length();
           unit = theunitssequence->Value(last);
-          shiftedunit = *(Handle(Units_ShiftedUnit)*)&unit;
+          shiftedunit = Handle(Units_ShiftedUnit)::DownCast (unit);
           shiftedunit->Move(move);
         }
       }