summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-10-11 15:43:06 +0200
committerworktycho <work.tycho@gmail.com>2014-10-11 15:43:06 +0200
commit1a07dc897d13c775c6f540f3500db505e5e80abc (patch)
tree26b346a71d3dc0631b12d4d767ef564c74ae2b68 /src
parentMoved a few objects to unique_ptr (diff)
downloadcuberite-1a07dc897d13c775c6f540f3500db505e5e80abc.tar
cuberite-1a07dc897d13c775c6f540f3500db505e5e80abc.tar.gz
cuberite-1a07dc897d13c775c6f540f3500db505e5e80abc.tar.bz2
cuberite-1a07dc897d13c775c6f540f3500db505e5e80abc.tar.lz
cuberite-1a07dc897d13c775c6f540f3500db505e5e80abc.tar.xz
cuberite-1a07dc897d13c775c6f540f3500db505e5e80abc.tar.zst
cuberite-1a07dc897d13c775c6f540f3500db505e5e80abc.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp
index a23db6242..f616063f5 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1067,12 +1067,13 @@ void cWorld::TickScheduledTasks(void)
cScheduledTasks Tasks;
{
cCSLock Lock(m_CSScheduledTasks);
+ auto WorldAge = m_WorldAge;
std::move(
m_ScheduledTasks.begin(),
std::find_if(
m_ScheduledTasks.begin(),
m_ScheduledTasks.end(),
- [m_WorldAge] (std::unique_ptr<cScheduledTask>& Task) { return Task->m_TargetTick < m_WorldAge;}),
+ [WorldAge] (std::unique_ptr<cScheduledTask>& Task) { return Task->m_TargetTick < m_WorldAge;}),
std::back_inserter(Tasks));
}