|
@@ -123,24 +123,24 @@ CMap * CMapEditManager::getMap()
|
|
|
|
|
|
void CMapEditManager::clearTerrain(CRandomGenerator * gen)
|
|
|
{
|
|
|
- execute(make_unique<CClearTerrainOperation>(map, gen ? gen : &(this->gen)));
|
|
|
+ execute(std::make_unique<CClearTerrainOperation>(map, gen ? gen : &(this->gen)));
|
|
|
}
|
|
|
|
|
|
void CMapEditManager::drawTerrain(TerrainId terType, CRandomGenerator * gen)
|
|
|
{
|
|
|
- execute(make_unique<CDrawTerrainOperation>(map, terrainSel, terType, gen ? gen : &(this->gen)));
|
|
|
+ execute(std::make_unique<CDrawTerrainOperation>(map, terrainSel, terType, gen ? gen : &(this->gen)));
|
|
|
terrainSel.clearSelection();
|
|
|
}
|
|
|
|
|
|
void CMapEditManager::drawRoad(RoadId roadType, CRandomGenerator* gen)
|
|
|
{
|
|
|
- execute(make_unique<CDrawRoadsOperation>(map, terrainSel, roadType, gen ? gen : &(this->gen)));
|
|
|
+ execute(std::make_unique<CDrawRoadsOperation>(map, terrainSel, roadType, gen ? gen : &(this->gen)));
|
|
|
terrainSel.clearSelection();
|
|
|
}
|
|
|
|
|
|
void CMapEditManager::drawRiver(RiverId riverType, CRandomGenerator* gen)
|
|
|
{
|
|
|
- execute(make_unique<CDrawRiversOperation>(map, terrainSel, riverType, gen ? gen : &(this->gen)));
|
|
|
+ execute(std::make_unique<CDrawRiversOperation>(map, terrainSel, riverType, gen ? gen : &(this->gen)));
|
|
|
terrainSel.clearSelection();
|
|
|
}
|
|
|
|
|
@@ -148,35 +148,35 @@ void CMapEditManager::drawRiver(RiverId riverType, CRandomGenerator* gen)
|
|
|
|
|
|
void CMapEditManager::insertObject(CGObjectInstance * obj)
|
|
|
{
|
|
|
- execute(make_unique<CInsertObjectOperation>(map, obj));
|
|
|
+ execute(std::make_unique<CInsertObjectOperation>(map, obj));
|
|
|
}
|
|
|
|
|
|
void CMapEditManager::insertObjects(std::set<CGObjectInstance*>& objects)
|
|
|
{
|
|
|
- auto composedOperation = make_unique<CComposedOperation>(map);
|
|
|
+ auto composedOperation = std::make_unique<CComposedOperation>(map);
|
|
|
for (auto obj : objects)
|
|
|
{
|
|
|
- composedOperation->addOperation(make_unique<CInsertObjectOperation>(map, obj));
|
|
|
+ composedOperation->addOperation(std::make_unique<CInsertObjectOperation>(map, obj));
|
|
|
}
|
|
|
execute(std::move(composedOperation));
|
|
|
}
|
|
|
|
|
|
void CMapEditManager::moveObject(CGObjectInstance * obj, const int3 & pos)
|
|
|
{
|
|
|
- execute(make_unique<CMoveObjectOperation>(map, obj, pos));
|
|
|
+ execute(std::make_unique<CMoveObjectOperation>(map, obj, pos));
|
|
|
}
|
|
|
|
|
|
void CMapEditManager::removeObject(CGObjectInstance * obj)
|
|
|
{
|
|
|
- execute(make_unique<CRemoveObjectOperation>(map, obj));
|
|
|
+ execute(std::make_unique<CRemoveObjectOperation>(map, obj));
|
|
|
}
|
|
|
|
|
|
void CMapEditManager::removeObjects(std::set<CGObjectInstance*> & objects)
|
|
|
{
|
|
|
- auto composedOperation = make_unique<CComposedOperation>(map);
|
|
|
+ auto composedOperation = std::make_unique<CComposedOperation>(map);
|
|
|
for (auto obj : objects)
|
|
|
{
|
|
|
- composedOperation->addOperation(make_unique<CRemoveObjectOperation>(map, obj));
|
|
|
+ composedOperation->addOperation(std::make_unique<CRemoveObjectOperation>(map, obj));
|
|
|
}
|
|
|
execute(std::move(composedOperation));
|
|
|
}
|