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 <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2022-04-11 21:50:40 +00:00 committed by Dawn LUCI CQ
parent 4a03ef6849
commit 7170b727c9
1 changed files with 2 additions and 2 deletions

View File

@ -530,8 +530,8 @@ namespace wgpu::interop {
}
// Check for out of range and throw a type error.
constexpr T kMin = std::numeric_limits<T>::min();
constexpr T kMax = std::numeric_limits<T>::max();
constexpr double kMin = static_cast<double>(std::numeric_limits<T>::min());
constexpr double kMax = static_cast<double>(std::numeric_limits<T>::max());
if (!(kMin <= doubleValue && doubleValue <= kMax)) {
return Error("Values are out of the range of that integer.");
}