Skip to content

Commit cab0ddb

Browse files
committed
Fixed warnings
1 parent 87c6c1d commit cab0ddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/nbl/builtin/hlsl/bit.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ uint16_t countl_zero(T n)
6666
const uint16_t shift = bits_log2 ? uint16_t(1)<<(bits_log2-1) : 0;
6767
const uint64_t loMask = bits_log2 ? (1ull<<shift)-1 : 0;
6868
const bool chooseHigh = n&(loMask<<shift);
69-
n = T(chooseHigh ? (n>shift):n)&loMask;
69+
n = uint16_t((chooseHigh ? (n>shift):n)&loMask);
7070

7171
result += uint16_t(chooseHigh ? 0ull : shift);
7272
}

0 commit comments

Comments
 (0)