diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-15 17:01:48 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-15 17:01:48 +0000 |
commit | a5f8b4aaccf99929024188fb2253f1fa2b6b3f44 (patch) | |
tree | 5b9f5df4951f2217c6367cdbd0e723dc97674d21 /crawl-ref/source/religion.cc | |
parent | cf4b68bb3c2e5d1955d41fff7284a7d56a484b3f (diff) | |
download | crawl-ref-a5f8b4aaccf99929024188fb2253f1fa2b6b3f44.tar.gz crawl-ref-a5f8b4aaccf99929024188fb2253f1fa2b6b3f44.zip |
Lots more cleanups.
Remove the sound-strength #defines because they're not used anymore (except
for SL_SPLASH, which has been replaced by its value.)
Change some #defines to const variables.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9087 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r-- | crawl-ref/source/religion.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 8987d02123..a907542e8b 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -11,6 +11,7 @@ REVISION("$Rev$"); #include "religion.h" +#include <algorithm> #include <sstream> #include <stdlib.h> #include <string.h> @@ -904,7 +905,7 @@ static void _inc_penance(god_type god, int val) } you.penance[god] += val; - you.penance[god] = MIN(MAX_PENANCE, you.penance[god]); + you.penance[god] = std::min<unsigned char>(MAX_PENANCE, you.penance[god]); if (god == GOD_BEOGH && _need_water_walking() && !beogh_water_walk()) fall_into_a_pool( you.pos(), true, grd(you.pos()) ); @@ -3318,7 +3319,7 @@ void gain_piety(int pgn) int old_piety = you.piety; you.piety += pgn; - you.piety = MIN(MAX_PIETY, you.piety); + you.piety = std::min<int>(MAX_PIETY, you.piety); for (int i = 0; i < MAX_GOD_ABILITIES; ++i) { |