-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix various bugs in DiscordBitSet (#772)
* WIDTH was defined to the width of a Byte not a Long, resulting in bugs in size, get and set * binary just did some completely wrong things that I can't really describe * hashCode could return different values for equal DiscordBitSets (when they had different amounts of trailing zeros in the data array), breaking its general contract * equals was comparing this with this and not this with other, which resulted in any two DiscordBitSets considered equal * contains would erroneously return false if other did have more trailing zeros but would otherwise be contained * set wasn't growing data correctly and also didn't unset bits properly
- Loading branch information
1 parent
f2e9c14
commit 3f5cd17
Showing
2 changed files
with
86 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters