Commit Graph

3 Commits

Author SHA1 Message Date
Tony Wasserka ccc04944b2 BitField: Fix alignment issues.
At least one platform (ARM with NEON instructions enabled) generates SIGBUSes if BitField objects aren't aligned properly.
2014-04-14 20:04:44 +02:00
Tony Wasserka 12841928df BitField: Optimize generated assembly by forcing inlining. 2014-04-13 13:27:01 +02:00
Tony Wasserka 48a1790d81 Common: Add a generic class for accessing bitfields in a fast and endianness-independent way.
The underlying storage type of a bitfield can be any intrinsic integer type,
but also any enumeration.

Custom storage types are supported if the following things are defined on the storage type:
- casting 0 to the storage type
- bit shift operators (in both directions)
- bitwise & operator
- bitwise ~ operator
- std::make_unsigned specialization
2014-03-25 23:33:04 +01:00