From 92d22c5ad9a1a70fefef9a5cb2ba801a0003f56b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 16 Dec 2009 00:31:42 -0600 Subject: silence some warnings --- crawl-ref/source/defines.h | 6 +++--- crawl-ref/source/player.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/defines.h b/crawl-ref/source/defines.h index 327d69af32..03a7ab6be5 100644 --- a/crawl-ref/source/defines.h +++ b/crawl-ref/source/defines.h @@ -141,9 +141,9 @@ const int ANON_FRIENDLY_MONSTER = -1999; const int DEBUG_COOKIE = 32767; const int MAX_SKILL_LEVEL = 27; -const unsigned int MAX_EXP_TOTAL = 8999999; -const unsigned int MAX_EXP_POOL = 20000; -const unsigned int FULL_EXP_POOL = MAX_EXP_POOL; +const int MAX_EXP_TOTAL = 8999999; +const int MAX_EXP_POOL = 20000; +const int FULL_EXP_POOL = MAX_EXP_POOL; const int MIN_HIT_MISS_PERCENTAGE = 5; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index b74219279a..733759432c 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -2510,7 +2510,7 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain, mprf(MSGCH_DIAGNOSTICS, "gain_exp: %d", exp_gained ); #endif - if (you.experience + exp_gained > MAX_EXP_TOTAL) + if (you.experience + exp_gained > (unsigned int)MAX_EXP_TOTAL) you.experience = MAX_EXP_TOTAL; else you.experience += exp_gained; @@ -2525,7 +2525,7 @@ void gain_exp( unsigned int exp_gained, unsigned int* actual_gain, exp_gained /= 2; } - if (you.exp_available + exp_gained > MAX_EXP_POOL) + if (you.exp_available + exp_gained > (unsigned int)MAX_EXP_POOL) you.exp_available = MAX_EXP_POOL; else you.exp_available += exp_gained; -- cgit v1.2.3-54-g00ecf