More type conversion warning cleanup; some minor refactoring in the phase bar while I was cleaning up the warnings.

This commit is contained in:
wrenczes
2010-10-28 06:57:34 +00:00
parent 98627d96ba
commit fadd36c0c4
6 changed files with 68 additions and 67 deletions

View File

@@ -8,8 +8,8 @@
#include "AllAbilities.h"
//TODO:better comments this is too cryptic to work on by anyone but original coder.
bool compare_aistats(AIStat * first, AIStat * second){
float damage1 = first->value / first->occurences;
float damage2 = second->value/ second->occurences;
float damage1 = static_cast<float>(first->value / first->occurences);
float damage2 = static_cast<float>(second->value / second->occurences);
return (damage1 > damage2);
}