diff options
| author | Joseph-Eugene Winzer | 2017-07-17 16:42:13 +0200 | 
|---|---|---|
| committer | Thierry Crozat | 2018-01-23 00:00:11 +0000 | 
| commit | 0f7266a6b4324ad43549be708b8fafd76ce8884f (patch) | |
| tree | 542dc8f2ae04e08d37ea5c0c97a41869cca4a94c | |
| parent | c903ede02383618489e4b1c74f5a63be2416256b (diff) | |
| download | scummvm-rg350-0f7266a6b4324ad43549be708b8fafd76ce8884f.tar.gz scummvm-rg350-0f7266a6b4324ad43549be708b8fafd76ce8884f.tar.bz2 scummvm-rg350-0f7266a6b4324ad43549be708b8fafd76ce8884f.zip | |
SUPERNOVA: Removes warnings for Inventory code
| -rw-r--r-- | engines/supernova/state.cpp | 6 | ||||
| -rw-r--r-- | 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 { | 
