mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 23:35:43 +00:00
Reserve allied player id vector (#7826)
This commit is contained in:
@@ -41,6 +41,7 @@ auto AlliedPids(const GameState *gameState, int playerId) -> std::vector<PlayerI
|
||||
std::vector<PlayerId> allyPids{};
|
||||
|
||||
if (pi->allies()) {
|
||||
allyPids.reserve(pi->allies()->size());
|
||||
for (const auto &ally : *pi->allies()) { allyPids.push_back(ally->player_id()); }
|
||||
}
|
||||
return allyPids;
|
||||
|
||||
Reference in New Issue
Block a user