Skip to content
Snippets Groups Projects
Commit 12819c41 authored by Loic Molinari's avatar Loic Molinari
Browse files

shared: Let bit asserts take a bit instead of a position


It's much more common to have bits defined as enums than having a
position, so let's just directly take a bit as argument to the bit
asserts. For the few cases where only the position is available, it's
easy to get the right bit using a shift.

The is_pow2_64() helper functions have been added in order to validate
the bit passed as argument and prevent programming errors.

Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
parent 57c3cee7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment