diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/resource_intern.cpp | 9 | ||||
-rw-r--r-- | engines/m4/viewmgr.h | 3 | ||||
-rw-r--r-- | engines/saga/render.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/debugger.cpp | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp index 23fe2e530b..0c2cda893c 100644 --- a/engines/kyra/resource_intern.cpp +++ b/engines/kyra/resource_intern.cpp @@ -37,7 +37,7 @@ namespace Kyra { PlainArchive::PlainArchive(Common::SharedPtr<Common::ArchiveMember> file, const FileInputList &files) : _file(file), _files() { - for (FileInputList::iterator i = files.begin(); i != files.end(); ++i) { + for (FileInputList::const_iterator i = files.begin(); i != files.end(); ++i) { Entry entry; entry.offset = i->offset; @@ -85,14 +85,15 @@ Common::SeekableReadStream *PlainArchive::createReadStreamForMember(const Common CachedArchive::CachedArchive(const FileInputList &files) : _files() { - for (FileInputList::iterator i = files.begin(); i != files.end(); ++i) { + for (FileInputList::const_iterator i = files.begin(); i != files.end(); ++i) { Entry entry; entry.data = i->data; entry.size = i->size; - i->name.toLowercase(); - _files[i->name] = entry; + Common::String name = i->name; + name.toLowercase(); + _files[name] = entry; } } diff --git a/engines/m4/viewmgr.h b/engines/m4/viewmgr.h index 4c4f227c5c..38ed3635c4 100644 --- a/engines/m4/viewmgr.h +++ b/engines/m4/viewmgr.h @@ -26,6 +26,7 @@ #ifndef M4_VIEWMGR_H #define M4_VIEWMGR_H +#include "common/algorithm.h" #include "common/array.h" #include "common/list.h" #include "common/events.h" @@ -172,7 +173,7 @@ public: Common::List<View *> views() const { return _views; } bool contains(View *key) const { - return find(_views.begin(), _views.end(), key) != _views.end(); + return Common::find(_views.begin(), _views.end(), key) != _views.end(); } bool contains(int screenType) { return getView(screenType) != NULL; } View *getView(int screenType); diff --git a/engines/saga/render.cpp b/engines/saga/render.cpp index f432dbd304..370961a869 100644 --- a/engines/saga/render.cpp +++ b/engines/saga/render.cpp @@ -220,7 +220,7 @@ void Render::addDirtyRect(Common::Rect rect) { if (x2 > x1 && y2 > y1) { Common::Rect rectClipped(x1, y1, x2, y2); // Check if the new rectangle is contained within another in the list - Common::List<Common::Rect>::const_iterator it; + Common::List<Common::Rect>::iterator it; for (it = _dirtyRects.begin(); it != _dirtyRects.end(); ++it) { if (it->contains(rectClipped)) return; diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index d7648d07b0..297d0a0d12 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -507,7 +507,7 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) { // No parameters given: Print out a list of all channels and their status if (argc <= 1) { DebugPrintf("Available debug channels: "); - for (Common::DebugChannelList::iterator i = lvls.begin(); i != lvls.end(); ++i) { + for (Common::DebugChannelList::const_iterator i = lvls.begin(); i != lvls.end(); ++i) { DebugPrintf("%c%s - %s (%s)\n", i->enabled ? '+' : ' ', i->name.c_str(), i->description.c_str(), i->enabled ? "enabled" : "disabled"); |