mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 12:27:43 +00:00
General: Make use of explicit constructors where applicable
Gets rid of potential error prone implicitly constructing constructors.
This commit is contained in:
@@ -9,11 +9,11 @@ class CHealthInfo {
|
||||
float x4_knockbackResistance;
|
||||
|
||||
public:
|
||||
CHealthInfo(float hp) : x0_health(hp), x4_knockbackResistance(0.f) {}
|
||||
explicit CHealthInfo(float hp) : x0_health(hp), x4_knockbackResistance(0.f) {}
|
||||
|
||||
CHealthInfo(float hp, float resist) : x0_health(hp), x4_knockbackResistance(resist) {}
|
||||
|
||||
CHealthInfo(CInputStream& in);
|
||||
explicit CHealthInfo(CInputStream& in);
|
||||
void SetHP(float hp) { x0_health = hp; }
|
||||
float GetHP() const { return x0_health; }
|
||||
float GetKnockbackResistance() const { return x4_knockbackResistance; }
|
||||
|
||||
Reference in New Issue
Block a user