[ox/std] Fix onMask's default bits value to use the number of bits instead of bytes
This commit is contained in:
parent
7b9c7ddde4
commit
de2e1bd1d6
2
deps/ox/src/ox/std/bitops.hpp
vendored
2
deps/ox/src/ox/std/bitops.hpp
vendored
@ -17,7 +17,7 @@ inline constexpr T rotateLeft(T i, int shift) {
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr T onMask(int bits = sizeof(T)) {
|
||||
constexpr T onMask(int bits = sizeof(T) * 8) {
|
||||
T out = 0;
|
||||
for (auto i = 0; i < bits; i++) {
|
||||
out |= static_cast<T>(1) << i;
|
||||
|
Loading…
Reference in New Issue
Block a user