mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 17:47:43 +00:00
CPASAnimState: Make use of size_t for indices
Same behavior, but plays nicer with containers. This can technically result in less zero-extensions with regards to memory indexing and registers, but this wasn't the underlying reason for the change.
This commit is contained in:
@@ -5,15 +5,18 @@ namespace urde {
|
||||
CPASAnimInfo::CPASAnimInfo(u32 id, rstl::reserved_vector<CPASAnimParm::UParmValue, 8>&& parms)
|
||||
: x0_id(id), x4_parms(std::move(parms)) {}
|
||||
|
||||
CPASAnimParm::UParmValue CPASAnimInfo::GetAnimParmValue(u32 idx) const {
|
||||
if (idx >= x4_parms.size())
|
||||
CPASAnimParm::UParmValue CPASAnimInfo::GetAnimParmValue(size_t idx) const {
|
||||
if (idx >= x4_parms.size()) {
|
||||
return CPASAnimParm::UParmValue{};
|
||||
}
|
||||
return x4_parms[idx];
|
||||
}
|
||||
|
||||
CPASAnimParm CPASAnimInfo::GetAnimParmData(u32 idx, CPASAnimParm::EParmType type) const {
|
||||
if (idx >= x4_parms.size())
|
||||
CPASAnimParm CPASAnimInfo::GetAnimParmData(size_t idx, CPASAnimParm::EParmType type) const {
|
||||
if (idx >= x4_parms.size()) {
|
||||
return CPASAnimParm::NoParameter();
|
||||
}
|
||||
|
||||
const CPASAnimParm::UParmValue& parm = x4_parms[idx];
|
||||
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user