aboutsummaryrefslogtreecommitdiff
path: root/engines/lure/res.cpp
diff options
context:
space:
mode:
authorChristoph Mallon2012-03-13 14:53:40 +0100
committerAlyssa Milburn2012-03-13 15:43:59 +0100
commite40ba4c1354fabc0d1bd81a6ab80cd5f349d88fa (patch)
tree6569d2e7059c4e951aed077d7519f46575d56224 /engines/lure/res.cpp
parent612bfe40924c1d266476385d24a1b889bcf81209 (diff)
downloadscummvm-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/res.cpp')
-rw-r--r--engines/lure/res.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index 001b882e0b..9ec641140b 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -677,9 +677,9 @@ void Resources::deactivateHotspot(uint16 hotspotId, bool isDestId) {
HotspotList::iterator i = _activeHotspots.begin();
while (i != _activeHotspots.end()) {
- Hotspot *h = (*i).get();
- if ((!isDestId && (h->hotspotId() == hotspotId)) ||
- (isDestId && (h->destHotspotId() == hotspotId) && (h->hotspotId() == 0xffff))) {
+ Hotspot const &h = **i;
+ if ((!isDestId && (h.hotspotId() == hotspotId)) ||
+ (isDestId && (h.destHotspotId() == hotspotId) && (h.hotspotId() == 0xffff))) {
_activeHotspots.erase(i);
break;
}
@@ -707,8 +707,7 @@ uint16 Resources::numInventoryItems() {
HotspotDataList &list = _hotspotData;
HotspotDataList::iterator i;
for (i = list.begin(); i != list.end(); ++i) {
- HotspotData *rec = (*i).get();
- if (rec->roomNumber == PLAYER_ID) ++numItems;
+ if ((*i)->roomNumber == PLAYER_ID) ++numItems;
}
return numItems;
@@ -753,12 +752,12 @@ void Resources::saveToStream(Common::WriteStream *stream) {
// Save out the schedule for any non-active NPCs
HotspotDataList::iterator i;
for (i = _hotspotData.begin(); i != _hotspotData.end(); ++i) {
- HotspotData *rec = (*i).get();
- if (!rec->npcSchedule.isEmpty()) {
- Hotspot *h = getActiveHotspot(rec->hotspotId);
+ HotspotData const &rec = **i;
+ if (!rec.npcSchedule.isEmpty()) {
+ Hotspot *h = getActiveHotspot(rec.hotspotId);
if (h == NULL) {
- stream->writeUint16LE(rec->hotspotId);
- rec->npcSchedule.saveToStream(stream);
+ stream->writeUint16LE(rec.hotspotId);
+ rec.npcSchedule.saveToStream(stream);
}
}
}