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:
parent
4a03ef6849
commit
7170b727c9
|
@ -530,8 +530,8 @@ namespace wgpu::interop {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for out of range and throw a type error.
|
// Check for out of range and throw a type error.
|
||||||
constexpr T kMin = std::numeric_limits<T>::min();
|
constexpr double kMin = static_cast<double>(std::numeric_limits<T>::min());
|
||||||
constexpr T kMax = std::numeric_limits<T>::max();
|
constexpr double kMax = static_cast<double>(std::numeric_limits<T>::max());
|
||||||
if (!(kMin <= doubleValue && doubleValue <= kMax)) {
|
if (!(kMin <= doubleValue && doubleValue <= kMax)) {
|
||||||
return Error("Values are out of the range of that integer.");
|
return Error("Values are out of the range of that integer.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue