We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f415e8c commit 8f72b9eCopy full SHA for 8f72b9e
14_Mortons/app_resources/common.hlsl
@@ -27,14 +27,14 @@ NBL_CONSTEXPR_INLINE_FUNC T createAnyBitIntegerFromU64(uint64_t val)
27
{
28
NBL_CONSTEXPR_FUNC_SCOPE_VAR uint64_t mask = (uint64_t(1) << (Bits - 1)) - 1;
29
// fill excess bit with one
30
- if (int64_t(val) < 0)
31
- return T(val) | ~mask;
+ if (_static_cast<int64_t>(val) < 0)
+ return _static_cast<T>(val | ~mask);
32
else
33
- return T(val) & mask;
+ return _static_cast<T>(val & mask);
34
} else
35
36
NBL_CONSTEXPR_FUNC_SCOPE_VAR uint64_t mask = (uint64_t(1) << Bits) - 1;
37
38
}
39
40
0 commit comments