From e6aa0a0d5390afb17bed3bed491cc30fdb3685b0 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Wed, 22 Mar 2023 15:54:53 +0300 Subject: [PATCH] Fixing typos --- src/codegen.inc.php | 4 ++-- tpl/macro.twig | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/codegen.inc.php b/src/codegen.inc.php index d5231e6..b13d2b5 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -476,9 +476,9 @@ function get_diff_related_units(\mtgMetaStruct $struct) if($field->hasToken('nodiff')) continue; - if($field->getType() instanceof mtgMetaStruct) + if($field->getType() instanceof \mtgMetaStruct) $result[] = $field->getType(); - else if($field->getType() instanceof mtgArrType) + else if($field->getType() instanceof \mtgArrType) $result[] = $field->getType()->getValue(); } return $result; diff --git a/tpl/macro.twig b/tpl/macro.twig index f555852..c127bb7 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -489,15 +489,15 @@ public class {{o.name}} : IRpc { bool is_equal = true; - {%- if has_token(o, 'bitfields') ~%} + {%- if has_token(u, 'bitfields') ~%} a.ResetFieldMask(); {%- endif -%} - {%- for f in o.fields ~%} - {{_self.field_compare(o, f, loop.index0)}} + {%- for f in u.fields ~%} + {{_self.field_compare(u, f, loop.index0)}} {%- endfor -%} - {%- if has_token(o, 'bitfields') ~%} + {%- if has_token(u, 'bitfields') ~%} if(!is_equal) a.SetPrimaryFieldsChanged(); {%- endif -%} @@ -508,8 +508,8 @@ public class {{o.name}} : IRpc {% endmacro %} {% macro compare_func_name(o) %} -{{has_token(u, 'bitfields')?'CompareAndMarkFields':'IsEqual'}} -{% endmacro %} +{{has_token(o, 'bitfields')?'CompareAndMarkFields':'IsEqual'}} +{%- endmacro %} {%- macro field_compare(o, f, field_idx) -%}