Connection: Collapse VertInBank into std::any_of

Same thing, single line.
This commit is contained in:
Lioncash 2019-08-23 12:26:11 -04:00
parent 5d30a9d7ea
commit 8fdd9a15c4
1 changed files with 1 additions and 4 deletions

View File

@ -1012,10 +1012,7 @@ bool Mesh::Surface::Vert::operator==(const Vert& other) const {
}
static bool VertInBank(const std::vector<uint32_t>& bank, uint32_t sIdx) {
for (uint32_t idx : bank)
if (sIdx == idx)
return true;
return false;
return std::any_of(bank.cbegin(), bank.cend(), [sIdx](auto index) { return index == sIdx; });
}
void Mesh::SkinBanks::Bank::addSkins(const Mesh& parent, const std::vector<uint32_t>& skinIdxs) {