-
Notifications
You must be signed in to change notification settings - Fork 474
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
Bitmap: Extract common bit operations like GetBit and SetBitTo #2105
Bitmap: Extract common bit operations like GetBit and SetBitTo #2105
Conversation
src/common/bitutil.h
Outdated
@@ -0,0 +1,148 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To keep consistence with other files, could you rename this file to bit_util.h
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Quality Gate passedIssues Measures |
…e#2105) This is a refactor, see: apache#2076 Previously, adhoc bit operations are used. This patch extract `GetBit` and `SetBitTo` operation to simplify the impl. Also, because the LSB/MSB format we're using it different in BitmapString and Bitmap( see apache/kvrocks-website#198 ), `lsb` and `msb` is extracted to prevent from mistakes.
This is a refactor, see: #2076
Previously, adhoc bit operations are used. This patch extract
GetBit
andSetBitTo
operation to simplify the impl.Also, because the LSB/MSB format we're using it different in BitmapString and Bitmap( see apache/kvrocks-website#198 ),
lsb
andmsb
is extracted to prevent from mistakes.