use deque instead of list to store references in cells

deque
Marc Zinnschlag 10 years ago
parent 7d35199396
commit c87b2aa072

@ -1,7 +1,7 @@
#ifndef GAME_MWWORLD_CELLREFLIST_H #ifndef GAME_MWWORLD_CELLREFLIST_H
#define GAME_MWWORLD_CELLREFLIST_H #define GAME_MWWORLD_CELLREFLIST_H
#include <list> #include <deque>
#include "livecellref.hpp" #include "livecellref.hpp"
@ -12,7 +12,7 @@ namespace MWWorld
struct CellRefList struct CellRefList
{ {
typedef LiveCellRef<X> LiveRef; typedef LiveCellRef<X> LiveRef;
typedef std::list<LiveRef> List; typedef std::deque<LiveRef> List;
List mList; List mList;
/// Search for the given reference in the given reclist from /// Search for the given reference in the given reclist from

@ -150,7 +150,7 @@ namespace MWWorld
if (const X *ptr = store.search (ref.mRefID)) if (const X *ptr = store.search (ref.mRefID))
{ {
typename std::list<LiveRef>::iterator iter = typename List::iterator iter =
std::find(mList.begin(), mList.end(), ref.mRefNum); std::find(mList.begin(), mList.end(), ref.mRefNum);
LiveRef liveCellRef (ref, ptr); LiveRef liveCellRef (ref, ptr);

Loading…
Cancel
Save