From 5b2a889ae94743a21101eb6c0d67f792fadc8aad Mon Sep 17 00:00:00 2001 From: "a.chubar" Date: Fri, 7 Jun 2024 18:34:53 +0300 Subject: [PATCH] Fixing nested diffable POD structs being incorrectly marked as clean in GetDiff --- CHANGELOG.md | 5 ++++- tpl/macro.twig | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6104832..c8c809c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v4.9.0 +- Fixing nested diffable POD structs being incorrectly marked as clean in GetDiff + ## v4.8.2 - Fixing thread safety possible issue when reading an array of enums - Fixing bug when the target enum array property wouldn't be cleared before reading data @@ -6,4 +9,4 @@ - Using C# built-in initialization routines instead of MetaIO's methods ## v4.7.0 -- Array comparison generated code now takes bitfields token into account for array entries \ No newline at end of file +- Array comparison generated code now takes bitfields token into account for array entries diff --git a/tpl/macro.twig b/tpl/macro.twig index 4deaeb6..7aff355 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -542,6 +542,16 @@ public class {{o.name}} : IRpc { MetaIO.SetFieldDirty(ref a.fields_mask, {{field_idx}}); is_equal = false; + + {% if has_token(f.type.value, 'bitfields') ~%} + //TODO: inefficient but reliable: marking the WHOLE collection as dirty when size changes + for(int i=0;i