2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 21:07:42 +00:00

General: Make use of explicit constructors where applicable

Gets rid of potential error prone implicitly constructing constructors.
This commit is contained in:
Lioncash
2020-03-25 21:25:11 -04:00
parent f4b3fb947e
commit 241a66dc0a
50 changed files with 117 additions and 111 deletions

View File

@@ -20,7 +20,7 @@ class CDamageInfo {
public:
constexpr CDamageInfo() = default;
CDamageInfo(CInputStream& in) {
explicit CDamageInfo(CInputStream& in) {
in.readUint32Big();
x0_weaponMode = CWeaponMode(EWeaponType(in.readUint32Big()));
x8_damage = in.readFloatBig();
@@ -38,7 +38,7 @@ public:
constexpr CDamageInfo& operator=(CDamageInfo&&) = default;
CDamageInfo(const CDamageInfo&, float);
CDamageInfo(const DataSpec::SShotParam& other);
explicit CDamageInfo(const DataSpec::SShotParam& other);
CDamageInfo& operator=(const DataSpec::SShotParam& other);
const CWeaponMode& GetWeaponMode() const { return x0_weaponMode; }