Array comparison generated code now takes bitfields token into account for array entries
Publish PHP Package / docker (push) Successful in 9s Details

This commit is contained in:
Alexey Chubar 2024-03-11 20:00:40 +07:00
parent 9ac3cca2e5
commit 63f2f90e79
1 changed files with 3 additions and 3 deletions

View File

@ -542,7 +542,7 @@ public class {{o.name}} : IRpc
{
{%- if f.type.value is instanceof('\\mtgMetaStruct') ~%}
var tmp_{{f.name}} = a.{{f.name}}[i];
if(!IsEqual(ref tmp_{{f.name}}, b.{{f.name}}[i]))
if(!{{_self.compare_func_name(f.type.value)}}(ref tmp_{{f.name}}, b.{{f.name}}[i]))
{
MetaIO.SetFieldDirty(ref a.fields_mask, {{field_idx}});
is_equal = false;
@ -567,7 +567,7 @@ public class {{o.name}} : IRpc
{
{%- if f.type.value is instanceof('\\mtgMetaStruct') ~%}
var tmp_{{f.name}} = a.{{f.name}}[i];
if(!IsEqual(ref tmp_{{f.name}}, b.{{f.name}}[i]))
if(!{{_self.compare_func_name(f.type.value)}}(ref tmp_{{f.name}}, b.{{f.name}}[i]))
return false;
{%- else -%}
if(a.{{f.name}}[i] != b.{{f.name}}[i])
@ -578,7 +578,7 @@ public class {{o.name}} : IRpc
{% elseif f.type is instanceof('\\mtgMetaStruct') ~%}
var tmp_{{f.name}} = a.{{f.name}}[i];
if(!IsEqual(ref tmp_{{f.name}}, b.{{f.name}}))
if(!{{_self.compare_func_name(f.type.value)}}(ref tmp_{{f.name}}, b.{{f.name}}))
{% if has_token(o, 'bitfields') ~%}
{
MetaIO.SetFieldDirty(ref a.fields_mask, {{field_idx}});