From a5f8b4aaccf99929024188fb2253f1fa2b6b3f44 Mon Sep 17 00:00:00 2001 From: haranp Date: Sun, 15 Feb 2009 17:01:48 +0000 Subject: 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 --- crawl-ref/source/skills.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/skills.cc') diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc index c53e91106d..674cb0551d 100644 --- a/crawl-ref/source/skills.cc +++ b/crawl-ref/source/skills.cc @@ -11,6 +11,7 @@ REVISION("$Rev$"); #include "skills.h" +#include #include #include @@ -285,7 +286,7 @@ static int _exercise2(int exsk) return (0); } - int spending_limit = MIN(MAX_SPENDING_LIMIT, you.exp_available); + int spending_limit = std::min(MAX_SPENDING_LIMIT, you.exp_available); // Handle fractional learning. if (skill_change > spending_limit) @@ -330,20 +331,20 @@ static int _exercise2(int exsk) if ((exsk >= SK_FIGHTING && exsk <= SK_STAVES) || exsk == SK_ARMOUR) { // These skills are easier for the strong. - skill_inc *= MAX(5, you.strength); + skill_inc *= std::max(5, you.strength); skill_inc /= 10; } else if (exsk >= SK_SLINGS && exsk <= SK_UNARMED_COMBAT) { // These skills are easier for the dexterous. // Note: Armour is handled above. - skill_inc *= MAX(5, you.dex); + skill_inc *= std::max(5, you.dex); skill_inc /= 10; } else if (exsk >= SK_SPELLCASTING && exsk <= SK_POISON_MAGIC) { // These skills are easier for the smart. - skill_inc *= MAX(5, you.intel); + skill_inc *= std::max(5, you.intel); skill_inc /= 10; } } -- cgit v1.2.3-54-g00ecf