2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-13 04:06:09 +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

@@ -5,12 +5,12 @@
namespace urde {
class CWeaponMode {
EWeaponType x0_weaponType = EWeaponType::None;
bool x4_24_charged : 1;
bool x4_25_comboed : 1;
bool x4_26_instantKill : 1;
bool x4_24_charged : 1 = false;
bool x4_25_comboed : 1 = false;
bool x4_26_instantKill : 1 = false;
public:
constexpr CWeaponMode() : x4_24_charged{false}, x4_25_comboed{false}, x4_26_instantKill{false} {}
constexpr CWeaponMode() = default;
constexpr explicit CWeaponMode(EWeaponType type, bool charged = false, bool comboed = false, bool instaKill = false)
: x0_weaponType(type), x4_24_charged(charged), x4_25_comboed(comboed), x4_26_instantKill(instaKill) {}
constexpr EWeaponType GetType() const { return x0_weaponType; }