Skip to content

Commit

Permalink
fix: MSVC complaining about the type
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Mar 22, 2024
1 parent 19002a5 commit eccc29d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crackcodes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# define popcount __popcnt

// https://stackoverflow.com/questions/355967/how-to-use-msvc-intrinsics-to-get-the-equivalent-of-this-gcc-code
uint32_t ctz(uint32_t value) {
uint32_t trailing_zero = 0;
unsigned long ctz(unsigned long value) {
unsigned long trailing_zero = 0;
if (_BitScanForward(&trailing_zero, value)) {
return trailing_zero;
}
Expand Down

0 comments on commit eccc29d

Please sign in to comment.