Fixed build error.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-06-02 14:02:32 +02:00
parent e4b9550efa
commit e8650e2a03
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 6 additions and 7 deletions

View File

@ -19,9 +19,3 @@ export uint8_t CreatureLib_BattleParty_IsResponsibleForIndex(bool& out, const Ba
} }
export bool CreatureLib_BattleParty_HasCreaturesNotInField(const BattleParty* p) { return p->HasCreaturesNotInField(); } export bool CreatureLib_BattleParty_HasCreaturesNotInField(const BattleParty* p) { return p->HasCreaturesNotInField(); }
inline bool BattleParty::IsResponsibleForIndex(uint8_t side, uint8_t index) const {
return std::any_of(_responsibleIndices.begin(), _responsibleIndices.end(), [side, index](const CreatureIndex& ci) {
return ci.GetSideIndex() == side && ci.GetCreatureIndex() == index;
});
}

View File

@ -24,7 +24,12 @@ namespace CreatureLib::Battling {
return _responsibleIndices.Contains(index); return _responsibleIndices.Contains(index);
} }
bool IsResponsibleForIndex(uint8_t side, uint8_t index) const; inline bool IsResponsibleForIndex(uint8_t side, uint8_t index) const {
return std::any_of(_responsibleIndices.begin(), _responsibleIndices.end(),
[side, index](const CreatureIndex& ci) {
return ci.GetSideIndex() == side && ci.GetCreatureIndex() == index;
});
}
inline bool HasCreaturesNotInField() const { inline bool HasCreaturesNotInField() const {
const auto& p = _party->GetParty(); const auto& p = _party->GetParty();