Skip to content

Commit 1093244

Browse files
bzbarsky-applepull[bot]
authored andcommitted
Don't try to use to_underlying for non-enum C++ types. (#20554)
Fixes project-chip/zap#591
1 parent 8ed11e5 commit 1093244

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/darwin-framework-tool/templates/partials/decodable_value.zapt

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
{{>decodable_value target=(concat ../target "." (asStructPropertyName label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster depth=(incrementDepth ../depth) }}
2828
{{/zcl_struct_items_by_struct_name}}
2929
{{else}}
30-
{{#if_chip_enum type}}
30+
{{#if_is_strongly_typed_chip_enum type}}
3131
{{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:chip::to_underlying({{source}})];
3232
{{else}}
3333
{{#if_is_strongly_typed_bitmap type}}
@@ -39,6 +39,6 @@
3939
{{else}}
4040
{{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}];
4141
{{/if_is_strongly_typed_bitmap}}
42-
{{/if_chip_enum}}
42+
{{/if_is_strongly_typed_chip_enum}}
4343
{{/if_is_struct}}
4444
{{/if}}

0 commit comments

Comments
 (0)