Core/Misc: Fix static analysis issues

This commit is contained in:
jackpoz authored and Aokromes committed 2017-04-26 05:09:44 +02:00
1 parent 68cadd6375
commit 1664c1bd2e
2 files changed
+5 -6

No files matched your search

+4 -5
View File
@@ -216,18 +216,17 @@ namespace VMAP
return false;
}
printf("Read coordinate mapping...\n");
uint32 mapID, tileX, tileY, check=0;
uint32 mapID, tileX, tileY, check;
G3D::Vector3 v1, v2;
ModelSpawn spawn;
while (!feof(dirf))
{
check = 0;
// read mapID, tileX, tileY, Flags, adtID, ID, Pos, Rot, Scale, Bound_lo, Bound_hi, name
check += fread(&mapID, sizeof(uint32), 1, dirf);
check = fread(&mapID, sizeof(uint32), 1, dirf);
if (check == 0) // EoF...
break;
check += fread(&tileX, sizeof(uint32), 1, dirf);
check += fread(&tileY, sizeof(uint32), 1, dirf);
fread(&tileX, sizeof(uint32), 1, dirf);
fread(&tileY, sizeof(uint32), 1, dirf);
if (!ModelSpawn::readFromFile(dirf, spawn))
break;
+1 -1
View File
@@ -12218,7 +12218,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update)
ItemTemplate const* pProto = pItem->GetTemplate();
// item set bonuses applied only at equip and removed at unequip, and still active for broken items
if (pProto && pProto->ItemSet)
if (pProto->ItemSet)
RemoveItemsSetItem(this, pProto);
_ApplyItemMods(pItem, slot, false);