1
0

Fix lambda capture

This commit is contained in:
worktycho 2014-10-11 14:43:06 +01:00
parent 473c0425d3
commit 1a07dc897d

View File

@ -1067,12 +1067,13 @@ void cWorld::TickScheduledTasks(void)
cScheduledTasks Tasks; cScheduledTasks Tasks;
{ {
cCSLock Lock(m_CSScheduledTasks); cCSLock Lock(m_CSScheduledTasks);
auto WorldAge = m_WorldAge;
std::move( std::move(
m_ScheduledTasks.begin(), m_ScheduledTasks.begin(),
std::find_if( std::find_if(
m_ScheduledTasks.begin(), m_ScheduledTasks.begin(),
m_ScheduledTasks.end(), 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)); std::back_inserter(Tasks));
} }