Commit 1b9f9c28 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Add overload - WIP

parent 1430c308
......@@ -21,3 +21,17 @@ void ITA::simulation_scheduler::room_acoustics::CReplacementFilter::filterReplac
}
}
}
void ITA::simulation_scheduler::room_acoustics::CReplacementFilter::filterReplace ( std::list<std::unique_ptr<CUpdateScene>>& updateList )
{
// Revers traversal of the updates, as the oldest updates are at the front,
// if a newer update removed them, the iterators are still valid.
for ( auto updateIter = updateList.rbegin ( ); updateIter != updateList.rend ( ); ++updateIter )
{
updateList.remove_if ( [&] ( const std::unique_ptr<CUpdateScene>& update )->bool
{
return ( *updateIter )->getReferenceID ( ) == update->getReferenceID ( ) &&
( *updateIter )->getTimeStamp ( ) > update->getTimeStamp ( );
} );
}
}
......@@ -24,6 +24,7 @@ namespace ITA
/// \param updateList update list from which outdated CSceneUpdates will be removed.
///
static inline void filterReplace ( std::list<std::unique_ptr<IUpdateMessage>>& updateList );
static inline void filterReplace ( std::list<std::unique_ptr<CUpdateScene>>& updateList );
};
} // namespace room_acoustics
} // namespace simulation_scheduler
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment