summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-24 14:09:52 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-24 14:09:52 -0800
commitc6b35c0012479ebe927bf479519678a863d0d328 (patch)
treec6873c04e7036ae0aa9a5b975bed3294ce958f34 /util
parent16461118be707834c1b2b43774a350fe6f6cc45c (diff)
downloadmc-c6b35c0012479ebe927bf479519678a863d0d328.tar.gz
Use eltshift.
Diffstat (limited to 'util')
-rw-r--r--util/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/util.h b/util/util.h
index 829340d..80887f8 100644
--- a/util/util.h
+++ b/util/util.h
@@ -92,7 +92,7 @@ static inline int bshas(Bitset *bs, size_t elt)
return 0;
eltidx = elt / (8 * sizeof(size_t));
eltshift = elt % (8 * sizeof(size_t));
- return (bs->chunks[eltidx] & (1ULL << (elt % (8 * sizeof(size_t))))) != 0;
+ return (bs->chunks[eltidx] & (1ULL << eltshift)) != 0;
}