Adding optimization for arrays self assingnment

This commit is contained in:
Georgiy Sadovnikov 2024-06-28 11:27:01 +03:00
parent 40dbbbb7c1
commit de5b6d62b4
1 changed files with 7 additions and 2 deletions

View File

@ -109,8 +109,13 @@
{%- if token_or(f, 'bhl_set', 1) != 0 ~%}
if(dv != null) {
{{ bhl_bind.val2native(f.type, 'dv', 'v') }};
cmp.{{f.name}} = v;
{%- if f.type is instanceof('\\mtgArrType') -%}
if(dv._obj != null && !dv._obj.Equals(v))
{%- endif ~%}
{
{{ bhl_bind.val2native(f.type, 'dv', 'v') }};
cmp.{{f.name}} = v;
}
dv.Release();
}
{%- endif ~%}