Skip to content

Commit

Permalink
Revert "Serializer: Fixes field default logic when not visible by def…
Browse files Browse the repository at this point in the history
…ault"

This reverts commit ef938b8.
  • Loading branch information
kenorb committed Sep 11, 2021
1 parent 08a889b commit c1eb58c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Serializer.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,15 @@ class Serializer {
}

// Is field default?
if ((field_flags & SERIALIZER_FIELD_FLAG_DEFAULT) == SERIALIZER_FIELD_FLAG_DEFAULT) {
if ((serializer_flags & SERIALIZER_FLAG_EXCLUDE_DEFAULT) == SERIALIZER_FLAG_EXCLUDE_DEFAULT) {
// Field was excluded by e.g., dynamic or feature type, but not included again explicitly by flag.
return false;
} else if ((serializer_flags & SERIALIZER_FLAG_INCLUDE_DEFAULT) == SERIALIZER_FLAG_INCLUDE_DEFAULT) {
// Field was excluded by e.g., dynamic or feature type, but included explicitly by flag.
return true;
} else {
return true;
if ((serializer_flags & SERIALIZER_FLAG_EXCLUDE_DEFAULT) == SERIALIZER_FLAG_EXCLUDE_DEFAULT) {
if ((field_flags & SERIALIZER_FIELD_FLAG_DEFAULT) == SERIALIZER_FIELD_FLAG_DEFAULT) {
if ((serializer_flags & SERIALIZER_FLAG_INCLUDE_DEFAULT) == SERIALIZER_FLAG_INCLUDE_DEFAULT) {
// Field was excluded by e.g., dynamic or feature type, but included explicitly by flag.
return true;
} else {
// Field was excluded by e.g., dynamic or feature type, but not included again explicitly by flag.
return false;
}
}
}

Expand Down

0 comments on commit c1eb58c

Please sign in to comment.