Use direct vector declarations in test helpers

This commit is contained in:
2026-06-23 13:09:55 -07:00
parent 549cf37127
commit a3e62d4fd4
3 changed files with 3 additions and 3 deletions
@@ -49,7 +49,7 @@ auto AddPlayerInfo(
-> flatbuffers::Offset<net::eagle0::shardok::storage::fb::PlayerInfo> {
const auto victoryConditionsOffset = fbb.CreateVector(victoryConditions);
auto alliesVec = std::vector<net::eagle0::shardok::storage::fb::AlliedPlayer>();
std::vector<net::eagle0::shardok::storage::fb::AlliedPlayer> alliesVec;
for (int pid : allyPids) { alliesVec.emplace_back(pid); }
const auto alliesOffset = fbb.CreateVectorOfStructs(alliesVec);
@@ -87,7 +87,7 @@ static auto GameWithUnitTs(
endGameCondition.mutate_victory_details(
net::eagle0::shardok::storage::fb::VictoryCondition_UNKNOWN_VICTORY_CONDITION);
auto winningIdsVec = std::vector<PlayerId>{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
std::vector<PlayerId> winningIdsVec{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
auto winningIdsOff = fbb.CreateVector(winningIdsVec);
auto statusB = net::eagle0::shardok::storage::fb::GameStatusBuilder(fbb);
statusB.add_state(
@@ -32,7 +32,7 @@ class HexMapUtilsTest : public ::testing::Test {
auto enemyUnitOffset = AddGenericUnit(enemyPlayerId, 2, Coords(1, 1));
auto hiddenEnemyOffset = AddGenericUnit(enemyPlayerId, 3, Coords(1, 2));
auto unitsVec = std::vector<Unit>{
std::vector<Unit> unitsVec{
ownUnitOffset,
alliedUnitOffset,
enemyUnitOffset,