Skip to content

Commit 8f72b9e

Browse files
author
kevyuu
committed
Fix compiler warning for shader compilation
1 parent f415e8c commit 8f72b9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

14_Mortons/app_resources/common.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ NBL_CONSTEXPR_INLINE_FUNC T createAnyBitIntegerFromU64(uint64_t val)
2727
{
2828
NBL_CONSTEXPR_FUNC_SCOPE_VAR uint64_t mask = (uint64_t(1) << (Bits - 1)) - 1;
2929
// fill excess bit with one
30-
if (int64_t(val) < 0)
31-
return T(val) | ~mask;
30+
if (_static_cast<int64_t>(val) < 0)
31+
return _static_cast<T>(val | ~mask);
3232
else
33-
return T(val) & mask;
33+
return _static_cast<T>(val & mask);
3434
} else
3535
{
3636
NBL_CONSTEXPR_FUNC_SCOPE_VAR uint64_t mask = (uint64_t(1) << Bits) - 1;
37-
return T(val) & mask;
37+
return _static_cast<T>(val & mask);
3838
}
3939
}
4040

0 commit comments

Comments
 (0)