diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-17 01:19:21 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-17 01:19:21 +0000 |
commit | b5115cd0a59685fcb43226b8dfee30145b9b6459 (patch) | |
tree | e14b05e5d7876a383e2fd87dda21a48c70ec2030 /crawl-ref/source/terrain.cc | |
parent | 3d210e2db0d48540e9d3ce80b92119eb9f78d41b (diff) | |
download | crawl-ref-b5115cd0a59685fcb43226b8dfee30145b9b6459.tar.gz crawl-ref-b5115cd0a59685fcb43226b8dfee30145b9b6459.zip |
Fixing compilation problem with std::min.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9107 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/terrain.cc')
-rw-r--r-- | crawl-ref/source/terrain.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 88fa5905b2..24194ae463 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -323,8 +323,9 @@ void get_door_description(int door_size, const char** adjective, const char** no "huge " , "gate", }; - const unsigned int idx = std::min(static_cast<unsigned int>(door_size*2), - ARRAYSZ(descriptions) - 2); + int max_idx = static_cast<int>(ARRAYSZ(descriptions) - 2); + const unsigned int idx = std::min(door_size*2, max_idx); + *adjective = descriptions[idx]; *noun = descriptions[idx+1]; } |