changeset 1568:addae48bc203

Fixing compiler warnings
author Grumpy7
date Sun, 08 Sep 2013 07:28:20 +0200
parents 9f8b3e904e14
children 19f1735fca80 5658d0f3b5ee
files Player.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Player.cpp	Sun Sep 08 05:22:33 2013 +0200
+++ b/Player.cpp	Sun Sep 08 07:28:20 2013 +0200
@@ -1977,7 +1977,7 @@
 {
   auto i = pEquipment.pIndices[uEquipIndex];
   if (i)
-    return ~(pOwnItems[i - 1].uAttributes & ITEM_BROKEN);
+    return (~(pOwnItems[i - 1].uAttributes & ITEM_BROKEN)) != 0;
   else 
     return false;
 }
@@ -2277,7 +2277,7 @@
       armor_indx = pEquipment.uArmor;
       if ( armor_indx )
       {
-        if ( !pOwnItems[armor_indx-1].uAttributes & ITEM_ENCHANTED)
+        if ( !(pOwnItems[armor_indx-1].uAttributes & ITEM_ENCHANTED))
         {
           pOwnItems[armor_indx-1].SetBroken();
         }
@@ -2290,7 +2290,7 @@
 }
 
 //----- (0048DCF6) --------------------------------------------------------
-int Player::_48DCF6(int a2, Actor *pActor)
+int Player::_48DCF6(int a2, Actor *pActor)  //TODO check this with IDA to see what the uninitialized vars are supposed to contain
 {
   signed int v3; // edi@1
   signed int v4; // ebx@1