diff options
author | lloyd <[email protected]> | 2009-03-27 20:05:55 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-03-27 20:05:55 +0000 |
commit | 3accc2eee41abb01aa9fdb88f426fd96098d0a0e (patch) | |
tree | b54ca7ea89560f5dde9670272665d07b5ed285ec /src | |
parent | fdc5fc1e78d584f6dd46d762ea524bcab20d56e3 (diff) |
Use u32bit instead of int for loop counter in ctz
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/bit_ops.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/bit_ops.h b/src/utils/bit_ops.h index 594d130a4..c876e6f14 100644 --- a/src/utils/bit_ops.h +++ b/src/utils/bit_ops.h @@ -78,7 +78,7 @@ inline u32bit hamming_weight(T n) template<typename T> inline u32bit ctz(T n) { - for(int i = 0; i != 8*sizeof(T); ++i) + for(u32bit i = 0; i != 8*sizeof(T); ++i) if((n >> i) & 0x01) return i; return 8*sizeof(T); |