From 75f278b91397cc05601447cfed48f1d9f3fb9968 Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Fri, 29 Jan 2016 19:25:25 +0300 Subject: [PATCH] moatHexes: use initializer list and update comment --- lib/CTownHandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CTownHandler.cpp b/lib/CTownHandler.cpp index 9ed82563b..4e1906c1b 100644 --- a/lib/CTownHandler.cpp +++ b/lib/CTownHandler.cpp @@ -88,8 +88,8 @@ CTown::~CTown() std::vector CTown::defaultMoatHexes() { - static const BattleHex moatHexes[] = {11, 28, 44, 61, 77, 111, 129, 146, 164, 181}; - return std::vector(moatHexes, moatHexes + ARRAY_COUNT(moatHexes)); + static const std::vector moatHexes = {11, 28, 44, 61, 77, 111, 129, 146, 164, 181}; + return moatHexes; } CTownHandler::CTownHandler() @@ -549,7 +549,7 @@ void CTownHandler::loadTown(CTown &town, const JsonNode & source) town.moatDamage = source["moatDamage"].Float(); - // Mods Compatability for pre 0.99 + // Compatability for <= 0.98f mods if(source["moatHexes"].isNull()) { town.moatHexes = CTown::defaultMoatHexes();