mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-12 22:06:08 +00:00
RuntimeCommonB: Make use of bitfield initializers where applicable
Given that we now target C++20, we can make use of bitfield initializers where applicable.
This commit is contained in:
@@ -6,10 +6,10 @@ namespace urde {
|
||||
|
||||
class CVisorParameters {
|
||||
public:
|
||||
u8 x0_mask : 4;
|
||||
bool x0_4_b1 : 1;
|
||||
bool x0_5_scanPassthrough : 1;
|
||||
CVisorParameters() : x0_mask(0xf), x0_4_b1(false), x0_5_scanPassthrough(false) {}
|
||||
u8 x0_mask : 4 = 0xf;
|
||||
bool x0_4_b1 : 1 = false;
|
||||
bool x0_5_scanPassthrough : 1 = false;
|
||||
CVisorParameters() = default;
|
||||
CVisorParameters(u8 mask, bool b1, bool scanPassthrough)
|
||||
: x0_mask(mask), x0_4_b1(b1), x0_5_scanPassthrough(scanPassthrough) {}
|
||||
u8 GetMask() const { return x0_mask; }
|
||||
|
||||
Reference in New Issue
Block a user