Skip to content

Commit

Permalink
fix macos build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp committed Feb 21, 2017
1 parent 0431012 commit 018da9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sparsepp/spp_bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static inline uint32_t s_spp_popcount_default(uint64_t x) SPP_NOEXCEPT
static inline uint32_t count_trailing_zeroes(size_t v) SPP_NOEXCEPT
{
size_t x = (v & -v) - 1;
return s_spp_popcount_default(x);
return sizeof(size_t) == 8 ? s_spp_popcount_default((uint64_t)x) : s_spp_popcount_default((uint32_t)x);
}

static inline uint32_t count_trailing_zeroes_naive(size_t v) SPP_NOEXCEPT
Expand Down

0 comments on commit 018da9e

Please sign in to comment.