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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user