diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-12-16 00:31:42 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-12-16 00:31:42 -0600 |
commit | 92d22c5ad9a1a70fefef9a5cb2ba801a0003f56b (patch) | |
tree | 0f07b9ffd1b2e483937f6a72b69dbbbecba34f9a | |
parent | 5d66ced3af630a94100a50f71224f6c7d1b2ef83 (diff) | |
download | crawl-ref-92d22c5ad9a1a70fefef9a5cb2ba801a0003f56b.tar.gz crawl-ref-92d22c5ad9a1a70fefef9a5cb2ba801a0003f56b.zip |
silence some warnings
-rw-r--r-- | crawl-ref/source/defines.h | 6 | ||||
-rw-r--r-- | 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; |