mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 21:17:45 +00:00
dawn::wire::client: Make ObjectTypeToTypeEnum a template variable.
Bug: dawn:1451 Change-Id: I21cba4b245b2b574104471da973000d552f1c7de Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93604 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
35199a30ae
commit
a55b29e0bd
@@ -20,10 +20,8 @@
|
||||
|
||||
namespace dawn::wire::client {
|
||||
|
||||
template <typename T>
|
||||
struct ObjectTypeToTypeEnum {
|
||||
static constexpr ObjectType value = static_cast<ObjectType>(-1);
|
||||
};
|
||||
template<typename T>
|
||||
static constexpr ObjectType ObjectTypeToTypeEnum = static_cast<ObjectType>(-1);
|
||||
|
||||
{% for type in by_category["object"] %}
|
||||
{% set Type = type.name.CamelCase() %}
|
||||
@@ -43,9 +41,7 @@ namespace dawn::wire::client {
|
||||
}
|
||||
|
||||
template <>
|
||||
struct ObjectTypeToTypeEnum<{{Type}}> {
|
||||
static constexpr ObjectType value = ObjectType::{{Type}};
|
||||
};
|
||||
static constexpr ObjectType ObjectTypeToTypeEnum<{{Type}}> = ObjectType::{{Type}};
|
||||
|
||||
{% endfor %}
|
||||
} // namespace dawn::wire::client
|
||||
|
||||
Reference in New Issue
Block a user