diff --git a/include/eepp/scene/scenenode.hpp b/include/eepp/scene/scenenode.hpp index 39d688d20..10a4455bd 100644 --- a/include/eepp/scene/scenenode.hpp +++ b/include/eepp/scene/scenenode.hpp @@ -125,8 +125,8 @@ class EE_API SceneNode : public Node { Color mHighlightOverColor; Color mHighlightInvalidationColor; Time mElapsed; - std::vector mScheduledUpdate; - std::vector mScheduledUpdateRemove; + std::list mScheduledUpdate; + std::list mScheduledUpdateRemove; virtual void onSizeChange(); diff --git a/src/eepp/scene/scenenode.cpp b/src/eepp/scene/scenenode.cpp index d92ac68b5..da38a158c 100644 --- a/src/eepp/scene/scenenode.cpp +++ b/src/eepp/scene/scenenode.cpp @@ -36,7 +36,6 @@ SceneNode::SceneNode( EE::Window::Window * window ) : { mNodeFlags |= NODE_FLAG_SCENENODE; mSceneNode = this; - mScheduledUpdate.reserve(100); enableReportSizeChangeToChilds(); @@ -134,7 +133,7 @@ void SceneNode::update( const Time& time ) { if ( !mScheduledUpdateRemove.empty() ) { for ( auto it = mScheduledUpdateRemove.begin(); it != mScheduledUpdateRemove.end(); ++it ) - mScheduledUpdate.erase( std::remove( mScheduledUpdate.begin(), mScheduledUpdate.end(), (*it) ), mScheduledUpdate.end() ); + mScheduledUpdate.remove( *it ); mScheduledUpdateRemove.clear(); }