From 63f2f90e799f247aa389436bb961c1f7be47df16 Mon Sep 17 00:00:00 2001 From: "a.chubar" Date: Mon, 11 Mar 2024 20:00:40 +0700 Subject: [PATCH] Array comparison generated code now takes bitfields token into account for array entries --- tpl/macro.twig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tpl/macro.twig b/tpl/macro.twig index 7dc8b55..756a9da 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -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}});