mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024023: Revamp the OCCT Handle - non-cost reference cast
Code corrected to avoid passing object to function as non-const reference to handle of the base type where it is not necessary.
This commit is contained in:
@@ -151,9 +151,10 @@ void TDataStd_Expression::Paste(const Handle(TDF_Attribute)& Into,
|
||||
{
|
||||
Handle(TDataStd_Expression) EXPR = Handle(TDataStd_Expression)::DownCast (Into);
|
||||
EXPR->SetExpression(myExpression);
|
||||
Handle(TDataStd_Variable) V1,V2;
|
||||
Handle(TDataStd_Variable) V1;
|
||||
for (TDF_ListIteratorOfAttributeList it (myVariables); it.More(); it.Next()) {
|
||||
V1 = Handle(TDataStd_Variable)::DownCast(it.Value());
|
||||
Handle(TDF_Attribute) V2;
|
||||
RT->HasRelocation (V1,V2);
|
||||
EXPR->GetVariables().Append(V2);
|
||||
}
|
||||
|
@@ -151,9 +151,10 @@ void TDataStd_Relation::Paste(const Handle(TDF_Attribute)& Into,
|
||||
{
|
||||
Handle(TDataStd_Relation) REL = Handle(TDataStd_Relation)::DownCast (Into);
|
||||
REL->SetRelation(myRelation);
|
||||
Handle(TDataStd_Variable) V1,V2;
|
||||
Handle(TDataStd_Variable) V1;
|
||||
for (TDF_ListIteratorOfAttributeList it (myVariables); it.More(); it.Next()) {
|
||||
V1 = Handle(TDataStd_Variable)::DownCast(it.Value());
|
||||
Handle(TDF_Attribute) V2;
|
||||
RT->HasRelocation (V1,V2);
|
||||
REL->GetVariables().Append(V2);
|
||||
}
|
||||
|
Reference in New Issue
Block a user