Use C++17 message-less static_assert where applicable.

Bug: dawn:824
Change-Id: I01dda88caaf613092541b62ea1b8d92768d405e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78724
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Corentin Wallez
2022-01-31 16:40:31 +00:00
committed by Dawn LUCI CQ
parent f9d8f2c0cb
commit 9c2e07cff9
34 changed files with 126 additions and 140 deletions

View File

@@ -71,8 +71,8 @@ namespace dawn::wire::server {
// an std::unordered_set. This lets us avoid providing our own hash and
// equality comparison operators.
inline uint64_t PackObjectTypeAndId(ObjectType type, ObjectId id) {
static_assert(sizeof(ObjectType) * 8 <= 32, "");
static_assert(sizeof(ObjectId) * 8 <= 32, "");
static_assert(sizeof(ObjectType) * 8 <= 32);
static_assert(sizeof(ObjectId) * 8 <= 32);
return (static_cast<uint64_t>(type) << 32) + id;
}