Skip to content

Commit 6338a93

Browse files
committed
Fix for findFirstZeroBit for small morton values on 64-bit GCC/clang #78
1 parent bbe4ec6 commit 6338a93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/libmorton/morton_common.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace libmorton {
3232
return false;
3333
}
3434
else {
35-
*firstbit_location = static_cast<unsigned long>((sizeof(morton) * 8) - __builtin_clzll(x) - 1);
35+
*firstbit_location = static_cast<unsigned long>((sizeof(unsigned long long) * 8) - __builtin_clzll(x) - 1);
3636
return true;
3737
}
3838
#endif

0 commit comments

Comments
 (0)