Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix NextClear out of range problem #52

Merged
merged 1 commit into from
May 1, 2017
Merged

Conversation

liaojie
Copy link
Contributor

@liaojie liaojie commented Apr 14, 2017

when we come to the last uint64 digit in NextClear, maybe we should be aware that not all bits of this one are included.
For example, v:= bitset.New(100), only the first 36 bits of the last uint64 should be available. Otherwise, after

   for i := uint(0); i != 100; i++ {
           v.Set(i)
   }

would be somehow wired to return the 101th bit as an unset bit since the user only created a 100 length bitset.

@lemire
Copy link
Member

lemire commented Apr 14, 2017

Looks good to me.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 84.272% when pulling f8f4dd5 on liaojie:master into 5c3c0fc on willf:master.

@willf willf merged commit f8f4dd5 into bits-and-blooms:master May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants