Skip to content

Commit

Permalink
Fix codegen to compile when a response command has a struct argument.
Browse files Browse the repository at this point in the history
Not sure why this was compiling at all, but it was using the wrong
type for its "construct an empty object" constructor.
  • Loading branch information
bzbarsky-apple committed Jan 18, 2022
1 parent 07454af commit 1f027f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ bool emberAf{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Call
GET_CLUSTER_RESPONSE_CALLBACKS("{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback");

Callback::Callback<{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback> * cb = Callback::Callback<{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}Callback>::FromCancelable(onSuccessCallback);
cb->mCall(cb->mContext{{#chip_cluster_response_arguments}}, {{#if isArray}}{{asSymbol label}}{{else}}{{#if_is_struct type}}{{asUnderlyingZclType type}}(){{else}}{{asSymbol label}}{{/if_is_struct}}{{/if}}{{/chip_cluster_response_arguments}});
cb->mCall(cb->mContext{{#chip_cluster_response_arguments}}, {{#if isArray}}{{asSymbol label}}{{else}}{{#if_is_struct type}}{{zapTypeToDecodableClusterObjectType type ns=parent.parent.name}}(){{else}}{{asSymbol label}}{{/if_is_struct}}{{/if}}{{/chip_cluster_response_arguments}});
return true;
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f027f2

Please sign in to comment.