mirror of https://github.com/AxioDL/metaforce.git
CStaticRes: Make use of CAssetId's IsValid() member function within operator bool
We should be testing against IsValid() here to handle all cases that indicate invalid values, as opposed to only handling the zero case.
This commit is contained in:
parent
209cd4a54e
commit
45c1bc9652
|
@ -27,12 +27,12 @@ class CStaticRes {
|
|||
zeus::CVector3f x4_scale;
|
||||
|
||||
public:
|
||||
constexpr CStaticRes()=default;
|
||||
constexpr CStaticRes() = default;
|
||||
CStaticRes(CAssetId id, const zeus::CVector3f& scale) : x0_cmdlId(id), x4_scale(scale) {}
|
||||
|
||||
CAssetId GetId() const { return x0_cmdlId; }
|
||||
const zeus::CVector3f& GetScale() const { return x4_scale; }
|
||||
explicit operator bool() const { return x0_cmdlId != 0; }
|
||||
explicit operator bool() const { return x0_cmdlId.IsValid(); }
|
||||
};
|
||||
|
||||
class CAnimRes {
|
||||
|
|
Loading…
Reference in New Issue