diff options
author | Christoph Mallon | 2012-03-13 14:53:40 +0100 |
---|---|---|
committer | Alyssa Milburn | 2012-03-13 15:43:59 +0100 |
commit | e40ba4c1354fabc0d1bd81a6ab80cd5f349d88fa (patch) | |
tree | 6569d2e7059c4e951aed077d7519f46575d56224 /engines/lure/room.cpp | |
parent | 612bfe40924c1d266476385d24a1b889bcf81209 (diff) | |
download | scummvm-rg350-e40ba4c1354fabc0d1bd81a6ab80cd5f349d88fa.tar.gz scummvm-rg350-e40ba4c1354fabc0d1bd81a6ab80cd5f349d88fa.tar.bz2 scummvm-rg350-e40ba4c1354fabc0d1bd81a6ab80cd5f349d88fa.zip |
JANITORIAL: Simply use *x instead of *x.get() on smart pointers.
Diffstat (limited to 'engines/lure/room.cpp')
-rw-r--r-- | engines/lure/room.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp index 4cb0cecd45..9a9313ece9 100644 --- a/engines/lure/room.cpp +++ b/engines/lure/room.cpp @@ -138,8 +138,8 @@ void Room::leaveRoom() { HotspotList &list = r.activeHotspots(); HotspotList::iterator i = list.begin(); while (i != list.end()) { - Hotspot *h = i->get(); - if (!h->persistant()) { + Hotspot const &h = **i; + if (!h.persistant()) { i = list.erase(i); } else { ++i; @@ -153,11 +153,11 @@ void Room::loadRoomHotspots() { HotspotDataList::iterator i; for (i = list.begin(); i != list.end(); ++i) { - HotspotData *rec = (*i).get(); + HotspotData const &rec = **i; - if ((rec->hotspotId < 0x7530) && (rec->roomNumber == _roomNumber) && - (rec->layer != 0)) - r.activateHotspot(rec->hotspotId); + if ((rec.hotspotId < 0x7530) && (rec.roomNumber == _roomNumber) && + (rec.layer != 0)) + r.activateHotspot(rec.hotspotId); } } @@ -252,24 +252,24 @@ CursorType Room::checkRoomExits() { RoomExitHotspotList::iterator i; for (i = exits.begin(); i != exits.end(); ++i) { - RoomExitHotspotData *rec = (*i).get(); + RoomExitHotspotData const &rec = **i; skipFlag = false; - if (rec->hotspotId != 0) { - join = res.getExitJoin(rec->hotspotId); + if (rec.hotspotId != 0) { + join = res.getExitJoin(rec.hotspotId); if ((join) && (join->blocked != 0)) skipFlag = true; } - if (!skipFlag && (m.x() >= rec->xs) && (m.x() <= rec->xe) && - (m.y() >= rec->ys) && (m.y() <= rec->ye)) { + if (!skipFlag && (m.x() >= rec.xs) && (m.x() <= rec.xe) && + (m.y() >= rec.ys) && (m.y() <= rec.ye)) { // Cursor is within exit area - CursorType cursorNum = (CursorType)rec->cursorNum; - _destRoomNumber = rec->destRoomNumber; + CursorType cursorNum = (CursorType)rec.cursorNum; + _destRoomNumber = rec.destRoomNumber; // If it's a hotspotted exit, change arrow to the + arrow - if (rec->hotspotId != 0) { - _hotspotId = rec->hotspotId; + if (rec.hotspotId != 0) { + _hotspotId = rec.hotspotId; _hotspot = res.getHotspot(_hotspotId); _hotspotNameId = _hotspot->nameId; _isExit = true; |