Compare commits

..
Author SHA1 Message Date
admin 22b762748e Use pre-increment in action point tests 2026-06-23 13:16:19 -07:00
3 changed files with 4 additions and 4 deletions
@@ -28,11 +28,11 @@ class ActionPointDistancesTest : public ::testing::Test {
// P P P M P P
// const_cast is safe because we own the mutable buffer (map)
for (int i = 6; i < 12; i++) {
for (int i = 6; i < 12; ++i) {
const_cast<Terrain*>(map->mutable_terrain()->GetMutableObject(i))
->mutate_type(net::eagle0::shardok::storage::fb::Terrain_::Type_FOREST);
}
for (int i = 18; i < 24; i++) {
for (int i = 18; i < 24; ++i) {
const_cast<Terrain*>(map->mutable_terrain()->GetMutableObject(i))
->mutate_type(net::eagle0::shardok::storage::fb::Terrain_::Type_RIVER);
}
@@ -49,7 +49,7 @@ class ArcheryCommandFactoryTest : public ::testing::Test {
auto def1Offset = AddGenericUnit(1, 1, def1pos);
auto def2Offset = AddGenericUnit(1, 2, def2pos);
vector<Unit> vec{attackerUnit, def1Offset, def2Offset};
auto vec = vector<Unit>{attackerUnit, def1Offset, def2Offset};
auto u = fbb.CreateVectorOfSortedStructs(&vec);
fbb.Finish(u);
@@ -22,7 +22,7 @@ class MeleeCommandFactoryTests : public ::testing::Test {
auto actorOff = AddGenericUnit(5, 0, position);
auto defenderOff = AddGenericUnit(3, 1, defenderPosition);
std::vector<Unit> unitsVec{actorOff, defenderOff};
auto unitsVec = std::vector<Unit>{actorOff, defenderOff};
auto unitsOff = fbb.CreateVectorOfSortedStructs(&unitsVec);
auto mapOff = AddBasicMap(fbb);