Fix lambda capture

master
worktycho 2014-10-11 14:43:06 +01:00
parent 473c0425d3
commit 1a07dc897d
1 changed files with 2 additions and 1 deletions

View File

@ -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));
}