diff options
author | Eugene Sandulenko | 2013-08-20 00:34:15 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2013-09-06 14:51:16 +0300 |
commit | 6ba453fa2a967f6081712efc5cb32c969b54472e (patch) | |
tree | b87bdc9d76857d2d3af298f7e5c9abac952df4ac /engines/fullpipe/inventory.cpp | |
parent | f0795656929e09e74f85c427cbf506e35eefc44f (diff) | |
download | scummvm-rg350-6ba453fa2a967f6081712efc5cb32c969b54472e.tar.gz scummvm-rg350-6ba453fa2a967f6081712efc5cb32c969b54472e.tar.bz2 scummvm-rg350-6ba453fa2a967f6081712efc5cb32c969b54472e.zip |
FULLPIPE: Fix number of bugs found by Coverity
Diffstat (limited to 'engines/fullpipe/inventory.cpp')
-rw-r--r-- | engines/fullpipe/inventory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index c45c66dc7e..8dc856e9c5 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -44,7 +44,7 @@ bool CInventory::load(MfcArchive &file) { t->flags = file.readUint32LE(); t->field_C = 0; t->field_A = -536; - _itemsPool.push_back(*t); + _itemsPool.push_back(t); } return true; @@ -55,7 +55,7 @@ int CInventory::getInventoryPoolItemIndexById(int itemId) { return -1; for (uint i = 0; i < _itemsPool.size(); i++) { - if (_itemsPool[i].id == itemId) + if (_itemsPool[i]->id == itemId) return i; } @@ -68,7 +68,7 @@ bool CInventory::setItemFlags(int itemId, int flags) { if (idx < 0) return false; else - _itemsPool[idx].flags = flags; + _itemsPool[idx]->flags = flags; return true; } @@ -90,7 +90,7 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia InventoryItem *t = new InventoryItem(); t->itemId = file.readUint16LE(); t->count = file.readUint16LE(); - _inventoryItems.push_back(*t); + _inventoryItems.push_back(t); } return true; |