1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Fix most of memleaks discovered by valgrind

This commit is contained in:
Ivan Savenko
2023-11-13 12:09:55 +02:00
parent 1192dbff15
commit 20ef3a69e7
18 changed files with 58 additions and 27 deletions

View File

@@ -860,7 +860,7 @@ void CGameHandler::onNewTurn()
fw.mode = ETileVisibility::REVEALED;
fw.player = player;
// find all hidden tiles
const auto fow = getPlayerTeam(player)->fogOfWarMap;
const auto & fow = getPlayerTeam(player)->fogOfWarMap;
auto shape = fow->shape();
for(size_t z = 0; z < shape[0]; z++)