From 7170b727c9da5357b7d6be0af2271bbfafb82a6e Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Mon, 11 Apr 2022 21:50:40 +0000 Subject: [PATCH] dawn/node: Fix GCC warning About comparisons of different datatypes Bug: dawn:1123 Change-Id: Iefdb8195041b824f63344a0b367fd5bebbe3ca85 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86308 Reviewed-by: Corentin Wallez Commit-Queue: Ben Clayton --- src/dawn/node/interop/Core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dawn/node/interop/Core.h b/src/dawn/node/interop/Core.h index 1ad90adf05..8408d157e8 100644 --- a/src/dawn/node/interop/Core.h +++ b/src/dawn/node/interop/Core.h @@ -530,8 +530,8 @@ namespace wgpu::interop { } // Check for out of range and throw a type error. - constexpr T kMin = std::numeric_limits::min(); - constexpr T kMax = std::numeric_limits::max(); + constexpr double kMin = static_cast(std::numeric_limits::min()); + constexpr double kMax = static_cast(std::numeric_limits::max()); if (!(kMin <= doubleValue && doubleValue <= kMax)) { return Error("Values are out of the range of that integer."); }