From 5441f45b41ead7d74f1e21cef7000134a2f4ad3e Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Wed, 27 Apr 2022 20:02:03 +0000 Subject: [PATCH] Fix 64 to 32 bit narrowing in dawn::wire Bug: dawn:1377 Change-Id: I310daeb99de986389e79282b99006e95964149ea Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87671 Commit-Queue: Austin Eng Kokoro: Kokoro Reviewed-by: Loko Kung Reviewed-by: Corentin Wallez --- src/dawn/wire/server/ServerAdapter.cpp | 2 +- src/dawn/wire/server/ServerInstance.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dawn/wire/server/ServerAdapter.cpp b/src/dawn/wire/server/ServerAdapter.cpp index a1df75bb31..8a6901e489 100644 --- a/src/dawn/wire/server/ServerAdapter.cpp +++ b/src/dawn/wire/server/ServerAdapter.cpp @@ -93,7 +93,7 @@ namespace dawn::wire::server { } } - cmd.featuresCount = features.size(); + cmd.featuresCount = static_cast(features.size()); cmd.features = features.data(); WGPUSupportedLimits limits = {}; diff --git a/src/dawn/wire/server/ServerInstance.cpp b/src/dawn/wire/server/ServerInstance.cpp index 529bb48b77..10998008b5 100644 --- a/src/dawn/wire/server/ServerInstance.cpp +++ b/src/dawn/wire/server/ServerInstance.cpp @@ -86,7 +86,7 @@ namespace dawn::wire::server { // Hide features the wire cannot support. auto it = std::partition(features.begin(), features.end(), IsFeatureSupported); - cmd.featuresCount = std::distance(features.begin(), it); + cmd.featuresCount = static_cast(std::distance(features.begin(), it)); cmd.features = features.data(); mProcs.adapterGetProperties(adapter, &properties);