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

Fix miscellaneous issues discovered by Sonar

This commit is contained in:
Ivan Savenko
2024-08-12 18:26:30 +00:00
parent 39d3217d20
commit 97f1a310df
44 changed files with 95 additions and 117 deletions

View File

@@ -124,26 +124,26 @@ CMap * CMapEditManager::getMap()
return map;
}
void CMapEditManager::clearTerrain(vstd::RNG * gen)
void CMapEditManager::clearTerrain(vstd::RNG * customGen)
{
execute(std::make_unique<CClearTerrainOperation>(map, gen ? gen : this->gen.get()));
execute(std::make_unique<CClearTerrainOperation>(map, customGen ? customGen : gen.get()));
}
void CMapEditManager::drawTerrain(TerrainId terType, int decorationsPercentage, vstd::RNG * gen)
void CMapEditManager::drawTerrain(TerrainId terType, int decorationsPercentage, vstd::RNG * customGen)
{
execute(std::make_unique<CDrawTerrainOperation>(map, terrainSel, terType, decorationsPercentage, gen ? gen : this->gen.get()));
execute(std::make_unique<CDrawTerrainOperation>(map, terrainSel, terType, decorationsPercentage, customGen ? customGen : gen.get()));
terrainSel.clearSelection();
}
void CMapEditManager::drawRoad(RoadId roadType, vstd::RNG* gen)
void CMapEditManager::drawRoad(RoadId roadType, vstd::RNG* customGen)
{
execute(std::make_unique<CDrawRoadsOperation>(map, terrainSel, roadType, gen ? gen : this->gen.get()));
execute(std::make_unique<CDrawRoadsOperation>(map, terrainSel, roadType, customGen ? customGen : gen.get()));
terrainSel.clearSelection();
}
void CMapEditManager::drawRiver(RiverId riverType, vstd::RNG* gen)
void CMapEditManager::drawRiver(RiverId riverType, vstd::RNG* customGen)
{
execute(std::make_unique<CDrawRiversOperation>(map, terrainSel, riverType, gen ? gen : this->gen.get()));
execute(std::make_unique<CDrawRiversOperation>(map, terrainSel, riverType, customGen ? customGen : gen.get()));
terrainSel.clearSelection();
}