summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-01-18 19:57:25 +0100
committerTycho <work.tycho+git@gmail.com>2014-01-18 19:57:25 +0100
commitd93a4362b4275d94efe9a40a76a095d52448d0d8 (patch)
tree4fd80624a7bf2b89b36b31e3278d5841a709c4e6
parentswitched to using m_WorldAge rather than m_TickID (diff)
downloadcuberite-d93a4362b4275d94efe9a40a76a095d52448d0d8.tar
cuberite-d93a4362b4275d94efe9a40a76a095d52448d0d8.tar.gz
cuberite-d93a4362b4275d94efe9a40a76a095d52448d0d8.tar.bz2
cuberite-d93a4362b4275d94efe9a40a76a095d52448d0d8.tar.lz
cuberite-d93a4362b4275d94efe9a40a76a095d52448d0d8.tar.xz
cuberite-d93a4362b4275d94efe9a40a76a095d52448d0d8.tar.zst
cuberite-d93a4362b4275d94efe9a40a76a095d52448d0d8.zip
-rw-r--r--src/World.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp
index a466acb84..134773f67 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -869,8 +869,7 @@ void cWorld::TickScheduledTasks()
// Make a copy of the tasks to avoid deadlocks on accessing m_Tasks
{
cCSLock Lock(m_CSScheduledTasks);
- ScheduledTaskList::iterator itr = m_ScheduledTasks.begin();
- while (itr != m_ScheduledTasks.end() && (*itr)->Ticks < m_WorldAge)
+ while (!m_ScheduledTasks.empty() && m_ScheduledTasks.front()->Ticks < m_WorldAge)
{
Tasks.push_back(m_ScheduledTasks.front());
m_ScheduledTasks.pop_front();