Fixing nested diffable POD structs being incorrectly marked as clean in GetDiff
Publish PHP Package / docker (push) Successful in 7s Details

This commit is contained in:
Alexey Chubar 2024-06-07 18:34:53 +03:00
parent 4e318232c3
commit 5b2a889ae9
2 changed files with 14 additions and 1 deletions

View File

@ -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
- Array comparison generated code now takes bitfields token into account for array entries

View File

@ -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<a.{{f.name}}.Count;++i)
{
var tmp_{{f.name}} = a.{{f.name}}[i];
tmp_{{f.name}}.fields_mask = FieldsMask.MakeDirty(tmp_{{f.name}}.GetFieldsCount());
a.{{f.name}}[i] = tmp_{{f.name}};
}
{% endif ~%}
}
else
{