OLD | NEW |
1 {% macro encode(field, value) %} | 1 {% macro encode(field, value) %} |
2 {% if field.is_bit_field -%} | 2 {% if field.is_bit_field -%} |
3 static_cast<unsigned>({{value}}) | 3 static_cast<unsigned>({{value}}) |
4 {%- else -%} | 4 {%- else -%} |
5 {{value}} | 5 {{value}} |
6 {%- endif %} | 6 {%- endif %} |
7 {% endmacro %} | 7 {% endmacro %} |
8 | 8 |
9 {% macro decode(field, value) %} | 9 {% macro decode(field, value) %} |
10 {% if field.is_bit_field -%} | 10 {% if field.is_bit_field -%} |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 {% macro fieldwise_diff(group_to_diff) %} | 124 {% macro fieldwise_diff(group_to_diff) %} |
125 {% for group in group_to_diff.subgroups %} | 125 {% for group in group_to_diff.subgroups %} |
126 if ({{group.group_name}}.Get() != other.{{group.group_name}}.Get()) { | 126 if ({{group.group_name}}.Get() != other.{{group.group_name}}.Get()) { |
127 {{fieldwise_diff(group)|indent(2, true)}} | 127 {{fieldwise_diff(group)|indent(2, true)}} |
128 } | 128 } |
129 {% endfor %} | 129 {% endfor %} |
130 {% for expression in group_to_diff.expressions %} | 130 {% for expression in group_to_diff.expressions %} |
131 if (self.{{expression}} != other.{{expression}}) | 131 if (self.{{expression}} != other.{{expression}}) |
132 return true; | 132 return true; |
133 {% endfor %} | 133 {% endfor %} |
| 134 {% for predicate in group_to_diff.predicates %} |
| 135 if (!self.{{predicate}}) |
| 136 return true; |
| 137 {% endfor %} |
134 {% endmacro %} | 138 {% endmacro %} |
OLD | NEW |