diff --git a/lib/Connection.h b/lib/Connection.h index 2a9ff6e29..cd0bdb747 100644 --- a/lib/Connection.h +++ b/lib/Connection.h @@ -752,7 +752,7 @@ public: void saveBooleanVector(const std::vector & data) { std::vector convData; - std::copy(data.begin(), data.end(), convData.begin()); + std::copy(data.begin(), data.end(), std::back_inserter(convData)); saveSerializable(convData); } }; @@ -1133,7 +1133,7 @@ public: { std::vector convData; loadSerializable(convData); - std::copy(convData.begin(), convData.end(), data.begin()); + std::copy(convData.begin(), convData.end(), std::back_inserter(data)); } }; diff --git a/lib/Mapping/MapFormatH3M.cpp b/lib/Mapping/MapFormatH3M.cpp index 45f68a9c0..da41f210b 100644 --- a/lib/Mapping/MapFormatH3M.cpp +++ b/lib/Mapping/MapFormatH3M.cpp @@ -2012,11 +2012,6 @@ CGTownInstance * CMapLoaderH3M::readTown(int castleID) readResourses(nce->resources); - for(int x = 0; x < 7; ++x) - { - nce->resources[x] = readUI32(); - } - nce->players = readUI8(); if(map->version > EMapFormat::AB) {