From 0f7266a6b4324ad43549be708b8fafd76ce8884f Mon Sep 17 00:00:00 2001 From: Joseph-Eugene Winzer Date: Mon, 17 Jul 2017 16:42:13 +0200 Subject: SUPERNOVA: Removes warnings for Inventory code --- engines/supernova/state.cpp | 6 +++--- engines/supernova/state.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index b8bb9dad6e..655a43d56c 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -40,7 +40,7 @@ void Inventory::add(Object &obj) { // TODO: Update Inventory surface for scrolling void Inventory::remove(Object &obj) { - for (uint i = 0; i < _numObjects; ++i) { + for (int i = 0; i < _numObjects; ++i) { if (_inventory[i] == &obj) { --_numObjects; while (i < _numObjects) { @@ -52,7 +52,7 @@ void Inventory::remove(Object &obj) { } } -Object *Inventory::get(uint index) const { +Object *Inventory::get(int index) const { if (index < _numObjects) return _inventory[index]; @@ -60,7 +60,7 @@ Object *Inventory::get(uint index) const { } Object *Inventory::get(ObjectID id) const { - for (uint i = 0; i < _numObjects; ++i) { + for (int i = 0; i < _numObjects; ++i) { if (_inventory[i]->_id == id) return _inventory[i]; } diff --git a/engines/supernova/state.h b/engines/supernova/state.h index e2d066f2cb..e0164170ff 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -64,13 +64,13 @@ public: void add(Object &obj); void remove(Object &obj); - Object *get(uint index) const; + Object *get(int index) const; Object *get(ObjectID id) const; - uint getSize() const { return _numObjects; } + int getSize() const { return _numObjects; } private: Object *_inventory[kMaxCarry]; - uint _numObjects; + int _numObjects; }; class GuiElement : public Common::Rect { -- cgit v1.2.3