mirror of https://github.com/AxioDL/metaforce.git
Runtime/Input/CFinalInput: Make comparison operators const
While we're at it, we can also provide an inequality operator for logical symmetry.
This commit is contained in:
parent
e9e9de26b2
commit
27a8274e3b
|
@ -72,8 +72,12 @@ struct CFinalInput {
|
||||||
CFinalInput(int cIdx, float dt, const boo::DolphinControllerState& data, const CFinalInput& prevInput, float leftDiv,
|
CFinalInput(int cIdx, float dt, const boo::DolphinControllerState& data, const CFinalInput& prevInput, float leftDiv,
|
||||||
float rightDiv);
|
float rightDiv);
|
||||||
CFinalInput(int cIdx, float dt, const CKeyboardMouseControllerData& data, const CFinalInput& prevInput);
|
CFinalInput(int cIdx, float dt, const CKeyboardMouseControllerData& data, const CFinalInput& prevInput);
|
||||||
|
|
||||||
CFinalInput& operator|=(const CFinalInput& other);
|
CFinalInput& operator|=(const CFinalInput& other);
|
||||||
bool operator==(const CFinalInput& other) { return memcmp(this, &other, sizeof(CFinalInput)) == 0; }
|
|
||||||
|
bool operator==(const CFinalInput& other) const { return memcmp(this, &other, sizeof(CFinalInput)) == 0; }
|
||||||
|
bool operator!=(const CFinalInput& other) const { return !operator==(other); }
|
||||||
|
|
||||||
float DeltaTime() const { return x0_dt; }
|
float DeltaTime() const { return x0_dt; }
|
||||||
u32 ControllerIdx() const { return x4_controllerIdx; }
|
u32 ControllerIdx() const { return x4_controllerIdx; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue