From 53661e92cb326cbd20a96c590eaaf7d06dd97feb Mon Sep 17 00:00:00 2001 From: "a.chubar" Date: Fri, 18 Apr 2025 17:55:49 +0300 Subject: [PATCH] Using a shared helper method to streamline the generated code --- CHANGELOG.md | 3 +++ tpl/macro.twig | 9 +-------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 228efef..144e21f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v7.1.0 +- Using a shared helper method to streamline the generated code + ## v7.0.0 - Using a dedicated wrapper for i18n strings to streamline the generated code diff --git a/tpl/macro.twig b/tpl/macro.twig index 7510c86..fe8129e 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -319,14 +319,7 @@ base.SyncFields(ctx); int fields_amount = {{fields_count(o)}}; var primary_id_mask = FieldsMask.MakeClean(fields_amount); SetPrimaryFieldsChanged(ref primary_id_mask); - for(int i = 0; i < fields_amount; i++) - { - bool is_primary_id = primary_id_mask.IsDirty(i); - if(!is_primary_id && fields_mask.IsDirty(i)) - return true; - } - - return false; + return FieldsMask.CheckContentsChanged(fields_amount, ref primary_id_mask, ref fields_mask); } public void SetDirtyMask()