From 4ebafa17b47d8adc0336c8e4046341410ab91d59 Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Sun, 21 Feb 2016 22:12:58 +0300 Subject: [PATCH] Remove unused placeholdedHeroes field --- lib/mapping/CMap.h | 2 +- lib/mapping/MapFormatH3M.cpp | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/mapping/CMap.h b/lib/mapping/CMap.h index b733b4302..979856854 100644 --- a/lib/mapping/CMap.h +++ b/lib/mapping/CMap.h @@ -259,7 +259,7 @@ public: std::vector players; /// The default size of the vector is PlayerColor::PLAYER_LIMIT. ui8 howManyTeams; std::vector allowedHeroes; - std::vector placeholdedHeroes; + bool areAnyPlayers; /// Unused. True if there are any playable players on the map. /// "main quests" of the map that describe victory and loss conditions diff --git a/lib/mapping/MapFormatH3M.cpp b/lib/mapping/MapFormatH3M.cpp index 496ceabc8..e4f4b8fd7 100644 --- a/lib/mapping/MapFormatH3M.cpp +++ b/lib/mapping/MapFormatH3M.cpp @@ -615,10 +615,15 @@ void CMapLoaderH3M::readAllowedHeroes() if(mapHeader->version > EMapFormat::ROE) { int placeholdersQty = reader.readUInt32(); - for(int p = 0; p < placeholdersQty; ++p) - { - mapHeader->placeholdedHeroes.push_back(reader.readUInt8()); - } + + reader.skip(placeholdersQty * 1); + +// std::vector placeholdedHeroes; +// +// for(int p = 0; p < placeholdersQty; ++p) +// { +// placeholdedHeroes.push_back(reader.readUInt8()); +// } } }