2
0
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:
Lioncash
2020-04-20 00:57:50 -04:00
parent 2103c38f54
commit 554893ef85
184 changed files with 587 additions and 1117 deletions

View File

@@ -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; }