From 79136298e9230c5f6fa23aacd9b28b204aed3694 Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 13 Jan 2009 22:57:15 +0000 Subject: More code cleanups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8446 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/describe.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/describe.cc') 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 ", -- cgit v1.2.3-54-g00ecf