From eccc29d474afcd0a58d72147ad6b08aa497563ee Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Fri, 22 Mar 2024 04:15:52 -0400 Subject: [PATCH] fix: MSVC complaining about the type --- src/crackcodes.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crackcodes.hpp b/src/crackcodes.hpp index 1ea9499..46274cc 100644 --- a/src/crackcodes.hpp +++ b/src/crackcodes.hpp @@ -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; }