Replace group filter operator with function

This commit is contained in:
gsemaj
2022-04-24 16:50:03 -04:00
committed by gsemaj
parent 2a622f901c
commit 6d760f5bce
4 changed files with 11 additions and 11 deletions

View File

@@ -14,7 +14,7 @@ struct Group {
std::vector<EntityRef> members;
int32_t conditionBitFlag;
auto operator[](EntityKind kind) {
std::vector<EntityRef> filter(EntityKind kind) {
std::vector<EntityRef> filtered;
std::copy_if(members.begin(), members.end(), std::back_inserter(filtered), [kind](EntityRef e) {
return e.kind == kind;