change some deque to vectors

master
Eduardo Bart 13 years ago
parent 3d4556e5c9
commit 7962fbec19

@ -26,6 +26,5 @@ typedef std::shared_ptr<UIVerticalLayout> UIVerticalLayoutPtr;
typedef std::shared_ptr<UIAnchorLayout> UIAnchorLayoutPtr;
typedef std::deque<UIWidgetPtr> UIWidgetList;
typedef std::deque<UIWidgetWeakPtr> UIWeakWidgetList;
#endif

@ -86,7 +86,7 @@ void Map::draw(const Rect& rect)
for(int iy = -5; iy <= 5; ++iy) {
Position itemPos = Position(playerPos.x + ix, playerPos.y + iy, playerPos.z);
if(const TilePtr& tile = m_tiles[itemPos]) {
std::deque<ThingPtr> creatures = tile->getCreatures();
std::vector<ThingPtr> creatures = tile->getCreatures();
for(auto it = creatures.rbegin(), end = creatures.rend(); it != end; ++it) {
const ThingPtr& thing = *it;
const CreaturePtr& creature = thing->asCreature();

@ -22,15 +22,15 @@ public:
int getStackSize(int stop);
std::deque<ThingPtr> getCreatures() { return m_creatures; }
std::vector<ThingPtr> getCreatures() { return m_creatures; }
int getDrawNextOffset() { return m_drawNextOffset; }
private:
ThingPtr m_ground;
std::deque<ThingPtr> m_itemsBottom;
std::deque<ThingPtr> m_creatures;
std::deque<ThingPtr> m_itemsTop;
std::deque<ThingPtr> m_effects;
std::vector<ThingPtr> m_itemsBottom;
std::vector<ThingPtr> m_creatures;
std::vector<ThingPtr> m_itemsTop;
std::vector<ThingPtr> m_effects;
int m_drawNextOffset;
};

Loading…
Cancel
Save