mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:35:42 +00:00
Use direct vector declarations in test helpers
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user