Skip to content

Commit

Permalink
Don't try to use to_underlying for non-enum C++ types. (#20554)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored Jul 11, 2022
1 parent a8414d5 commit d98568f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{>decodable_value target=(concat ../target "." (asStructPropertyName label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster depth=(incrementDepth ../depth) }}
{{/zcl_struct_items_by_struct_name}}
{{else}}
{{#if_chip_enum type}}
{{#if_is_strongly_typed_chip_enum type}}
{{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:chip::to_underlying({{source}})];
{{else}}
{{#if_is_strongly_typed_bitmap type}}
Expand All @@ -39,6 +39,6 @@
{{else}}
{{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}];
{{/if_is_strongly_typed_bitmap}}
{{/if_chip_enum}}
{{/if_is_strongly_typed_chip_enum}}
{{/if_is_struct}}
{{/if}}

0 comments on commit d98568f

Please sign in to comment.