Skip to content

Commit 613e287

Browse files
Make it clearer that cluster-enums-check is returning kUnknownEnumValue. (project-chip#31951)
Instead of hardcoding the returns via the ZAP template, just use the symbolic name.
1 parent 473fa74 commit 613e287

File tree

2 files changed

+187
-187
lines changed

2 files changed

+187
-187
lines changed

src/app/zap-templates/templates/app/cluster-enums-check.zapt

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(detail::{{asType label}
1919
{{/zcl_enum_items}}
2020
return val;
2121
default:
22-
return static_cast<EnumType>({{first_unused_enum_value mode="first_unused"}});
22+
return EnumType::kUnknownEnumValue;
2323
}
2424
}
2525
{{/unless}}
@@ -39,7 +39,7 @@ static auto __attribute__((unused)) EnsureKnownEnumValue({{asUpperCamelCase ../n
3939
{{/zcl_enum_items}}
4040
return val;
4141
default:
42-
return static_cast<EnumType>({{first_unused_enum_value mode="first_unused"}});
42+
return EnumType::kUnknownEnumValue;
4343
}
4444
}
4545
{{/unless}}

0 commit comments

Comments
 (0)