From c87b2aa07287551be6843784582c9fec9a118c9a Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 14 Oct 2014 15:13:38 +0200 Subject: [PATCH] use deque instead of list to store references in cells --- apps/openmw/mwworld/cellreflist.hpp | 4 ++-- apps/openmw/mwworld/cellstore.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwworld/cellreflist.hpp b/apps/openmw/mwworld/cellreflist.hpp index 9c3370f08..1c5789f17 100644 --- a/apps/openmw/mwworld/cellreflist.hpp +++ b/apps/openmw/mwworld/cellreflist.hpp @@ -1,7 +1,7 @@ #ifndef GAME_MWWORLD_CELLREFLIST_H #define GAME_MWWORLD_CELLREFLIST_H -#include +#include #include "livecellref.hpp" @@ -12,7 +12,7 @@ namespace MWWorld struct CellRefList { typedef LiveCellRef LiveRef; - typedef std::list List; + typedef std::deque List; List mList; /// Search for the given reference in the given reclist from diff --git a/apps/openmw/mwworld/cellstore.cpp b/apps/openmw/mwworld/cellstore.cpp index ce8d77758..cb5dd20ef 100644 --- a/apps/openmw/mwworld/cellstore.cpp +++ b/apps/openmw/mwworld/cellstore.cpp @@ -150,7 +150,7 @@ namespace MWWorld if (const X *ptr = store.search (ref.mRefID)) { - typename std::list::iterator iter = + typename List::iterator iter = std::find(mList.begin(), mList.end(), ref.mRefNum); LiveRef liveCellRef (ref, ptr);