mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Refactoring: always use std prefix for shared_ptr, unique_ptr and make_shared
Long time ago it's was used without prefix to make future switch from boost to std version easier. I discusses this with Ivan and decide to drop these using from Global.h now. This change wouldn't break anything because there was already code with prefix for each of three cases.
This commit is contained in:
@ -189,7 +189,7 @@ const CMapOperation * CMapUndoManager::peekUndo() const
|
||||
return peek(undoStack);
|
||||
}
|
||||
|
||||
void CMapUndoManager::addOperation(unique_ptr<CMapOperation> && operation)
|
||||
void CMapUndoManager::addOperation(std::unique_ptr<CMapOperation> && operation)
|
||||
{
|
||||
undoStack.push_front(std::move(operation));
|
||||
if(undoStack.size() > undoRedoLimit) undoStack.pop_back();
|
||||
@ -252,7 +252,7 @@ void CMapEditManager::insertObject(CGObjectInstance * obj, const int3 & pos)
|
||||
execute(make_unique<CInsertObjectOperation>(map, obj, pos));
|
||||
}
|
||||
|
||||
void CMapEditManager::execute(unique_ptr<CMapOperation> && operation)
|
||||
void CMapEditManager::execute(std::unique_ptr<CMapOperation> && operation)
|
||||
{
|
||||
operation->execute();
|
||||
undoManager.addOperation(std::move(operation));
|
||||
@ -302,7 +302,7 @@ void CComposedOperation::redo()
|
||||
}
|
||||
}
|
||||
|
||||
void CComposedOperation::addOperation(unique_ptr<CMapOperation> && operation)
|
||||
void CComposedOperation::addOperation(std::unique_ptr<CMapOperation> && operation)
|
||||
{
|
||||
operations.push_back(std::move(operation));
|
||||
}
|
||||
|
Reference in New Issue
Block a user