summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/skills.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2012-08-26 17:47:35 -0400
committerNeil Moore <neil@s-z.org>2012-08-26 17:47:35 -0400
commit0e1e71dfe8e254a2d925fcb0a7ee6905c4175dd1 (patch)
tree67fd4c3beee19671e71603a0740812fe9605a839 /crawl-ref/source/skills.cc
parent770bcbd1844b97b671d0e47ea8313cdf2c74c5ea (diff)
downloadcrawl-ref-0e1e71dfe8e254a2d925fcb0a7ee6905c4175dd1.tar.gz
crawl-ref-0e1e71dfe8e254a2d925fcb0a7ee6905c4175dd1.zip
Unbreak compilation with GCC 4.1.
We were getting an ambiguous overload with between pow(double, double) and pow(double, int) when calling pow() with two ints. It didn't show up before 0.12-a0-208-g770bcbd because the version taking an int was hidden in the std:: namespace. This doesn't seem to be a problem with GCC 4.6.
Diffstat (limited to 'crawl-ref/source/skills.cc')
-rw-r--r--crawl-ref/source/skills.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/skills.cc b/crawl-ref/source/skills.cc
index d0f6b274d1..5267c31ada 100644
--- a/crawl-ref/source/skills.cc
+++ b/crawl-ref/source/skills.cc
@@ -560,13 +560,13 @@ void init_training()
skills.init(0);
for (int i = 0; i < NUM_SKILLS; ++i)
if (skill_trained(i))
- skills[i] = pow(you.skill_points[i], 2);
+ skills[i] = pow(you.skill_points[i], 2.0);
_scale_array(skills, EXERCISE_QUEUE_SIZE, true);
_init_queue(you.exercises, skills);
for (int i = 0; i < NUM_SKILLS; ++i)
- skills[i] = pow(you.skill_points[i], 2);
+ skills[i] = pow(you.skill_points[i], 2.0);
_scale_array(skills, EXERCISE_QUEUE_SIZE, true);
_init_queue(you.exercises_all, skills);