summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-13 22:57:15 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-13 22:57:15 +0000
commit79136298e9230c5f6fa23aacd9b28b204aed3694 (patch)
treee684423001766c5d37ec28d4887bdc668a9fd577 /crawl-ref/source/describe.cc
parentc32244f1ca9dfacd55040e1a61c3ff6c5c1ab4d5 (diff)
downloadcrawl-ref-79136298e9230c5f6fa23aacd9b28b204aed3694.tar.gz
crawl-ref-79136298e9230c5f6fa23aacd9b28b204aed3694.zip
More code cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8446 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 000302d9fd..ce6056b292 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -521,10 +521,8 @@ static std::string _randart_descrip( const item_def &item )
if (propdescs[i].is_graded_resist)
{
int idx = proprt[propdescs[i].property] + 3;
- if (idx < 0)
- idx = 0;
- if (idx > 6)
- idx = 6;
+ idx = std::min(idx, 6);
+ idx = std::max(idx, 0);
const char* prefixes[] = {
"It makes you extremely vulnerable to ",