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

IAnimReader: Make use of std::string_view where applicable

Same behavior, but allows interoperating with different string types in
a more straightforward manner.
This commit is contained in:
Lioncash
2020-03-31 03:05:05 -04:00
parent 13ce419554
commit 2c36b0bb83
11 changed files with 34 additions and 33 deletions

View File

@@ -172,7 +172,7 @@ u32 CAnimSourceReaderBase::VGetSoundPOIList(const CCharAnimTime& time, CSoundPOI
return 0;
}
bool CAnimSourceReaderBase::VGetBoolPOIState(const char* name) const {
bool CAnimSourceReaderBase::VGetBoolPOIState(std::string_view name) const {
const auto iter = std::find_if(x24_boolStates.cbegin(), x24_boolStates.cend(),
[name](const auto& entry) { return entry.first == name; });
@@ -183,7 +183,7 @@ bool CAnimSourceReaderBase::VGetBoolPOIState(const char* name) const {
return iter->second;
}
s32 CAnimSourceReaderBase::VGetInt32POIState(const char* name) const {
s32 CAnimSourceReaderBase::VGetInt32POIState(std::string_view name) const {
const auto iter = std::find_if(x34_int32States.cbegin(), x34_int32States.cend(),
[name](const auto& entry) { return entry.first == name; });
@@ -194,7 +194,7 @@ s32 CAnimSourceReaderBase::VGetInt32POIState(const char* name) const {
return iter->second;
}
CParticleData::EParentedMode CAnimSourceReaderBase::VGetParticlePOIState(const char* name) const {
CParticleData::EParentedMode CAnimSourceReaderBase::VGetParticlePOIState(std::string_view name) const {
const auto iter = std::find_if(x44_particleStates.cbegin(), x44_particleStates.cend(),
[name](const auto& entry) { return entry.first == name; });