CPAS*: Make constructors explicit

Prevents undesirable implicit constructions from occurring.
This commit is contained in:
Lioncash 2020-02-28 04:35:50 -05:00
parent fe05c42be4
commit d79b9d925e
3 changed files with 4 additions and 4 deletions

View File

@ -17,8 +17,8 @@ class CPASAnimState {
mutable std::vector<s32> x24_selectionCache;
public:
CPASAnimState(CInputStream& in);
CPASAnimState(int stateId);
explicit CPASAnimState(CInputStream& in);
explicit CPASAnimState(int stateId);
s32 GetStateId() const { return x0_id; }
s32 GetNumAnims() const { return x14_anims.size(); }
CPASAnimParm GetAnimParmData(s32, u32) const;

View File

@ -18,7 +18,7 @@ class CPASDatabase {
void SetDefaultState(s32 state) { x10_defaultState = state; }
public:
CPASDatabase(CInputStream& in);
explicit CPASDatabase(CInputStream& in);
std::pair<float, s32> FindBestAnimation(const CPASAnimParmData&, s32) const;
std::pair<float, s32> FindBestAnimation(const CPASAnimParmData&, CRandom16&, s32) const;

View File

@ -16,7 +16,7 @@ public:
CPASAnimParm::UParmValue x10_max;
public:
CPASParmInfo(CInputStream& in);
explicit CPASParmInfo(CInputStream& in);
CPASAnimParm::EParmType GetParameterType() const { return x0_type; }
EWeightFunction GetWeightFunction() const { return x4_weightFunction; }
float GetParameterWeight() const { return x8_weight; }