2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 19:47:44 +00:00

CToken: Add HasReference() member function

Has the same semantics of operator bool(), but explains at the call site
what is actually being tested for in the relation to the object itself.

Aims to make readability slightly better (and removed the need for
casts).
This commit is contained in:
Lioncash
2020-03-08 21:10:15 -04:00
parent fc5170ede9
commit 2233a78fe2
4 changed files with 11 additions and 9 deletions

View File

@@ -75,7 +75,7 @@ public:
CCharAnimTime GetAnimationDuration() const { return MainHeader().duration; }
float GetAverageVelocity() const { return x10_averageVelocity; }
const zeus::CVector3f& GetRootOffset() const { return x14_rootOffset; }
bool HasPOIData() const { return bool(x8_evntToken); }
bool HasPOIData() const { return x8_evntToken.HasReference(); }
const std::vector<CBoolPOINode>& GetBoolPOIStream() const { return x8_evntToken->GetBoolPOIStream(); }
const std::vector<CInt32POINode>& GetInt32POIStream() const { return x8_evntToken->GetInt32POIStream(); }
const std::vector<CParticlePOINode>& GetParticlePOIStream() const { return x8_evntToken->GetParticlePOIStream(); }