summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-20 15:13:33 +0100
committerMattes D <github@xoft.cz>2015-03-20 15:13:33 +0100
commit781c8683f7021ceb27dc83c19f7207322f2227d1 (patch)
tree9e723a35ce9d43627da12fd1901bde9ffed20e4b /src/World.cpp
parentUpdated Core. (diff)
downloadcuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.gz
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.bz2
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.lz
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.xz
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.zst
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 292ff9b94..03f09c028 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -3167,14 +3167,14 @@ void cWorld::SaveAllChunks(void)
void cWorld::QueueSaveAllChunks(void)
{
- QueueTask(make_unique<cWorld::cTaskSaveAllChunks>());
+ QueueTask(std::make_shared<cWorld::cTaskSaveAllChunks>());
}
-void cWorld::QueueTask(std::unique_ptr<cTask> a_Task)
+void cWorld::QueueTask(cTaskPtr a_Task)
{
cCSLock Lock(m_CSTasks);
m_Tasks.push_back(std::move(a_Task));
@@ -3184,7 +3184,7 @@ void cWorld::QueueTask(std::unique_ptr<cTask> a_Task)
-void cWorld::ScheduleTask(int a_DelayTicks, cTask * a_Task)
+void cWorld::ScheduleTask(int a_DelayTicks, cTaskPtr a_Task)
{
Int64 TargetTick = a_DelayTicks + std::chrono::duration_cast<cTickTimeLong>(m_WorldAge).count();
@@ -3194,11 +3194,11 @@ void cWorld::ScheduleTask(int a_DelayTicks, cTask * a_Task)
{
if ((*itr)->m_TargetTick >= TargetTick)
{
- m_ScheduledTasks.insert(itr, make_unique<cScheduledTask>(TargetTick, a_Task));
+ m_ScheduledTasks.insert(itr, cScheduledTaskPtr(new cScheduledTask(TargetTick, a_Task)));
return;
}
}
- m_ScheduledTasks.push_back(make_unique<cScheduledTask>(TargetTick, a_Task));
+ m_ScheduledTasks.push_back(cScheduledTaskPtr(new cScheduledTask(TargetTick, a_Task)));
}