summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 18:05:27 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-15 18:05:27 +0000
commitf7e71c953f4570fba5638a16639e4bf63b5386bb (patch)
tree2ebccd3bb1da6119865687c2a7eca57946a12ca3 /crawl-ref/source/player.cc
parent17031358b36fa9c1e34b7edcc73fecaeeb06a22d (diff)
downloadcrawl-ref-f7e71c953f4570fba5638a16639e4bf63b5386bb.tar.gz
crawl-ref-f7e71c953f4570fba5638a16639e4bf63b5386bb.zip
Add more miscellaneous minor cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5852 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 51a66351bb..ddf66e78d1 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -3646,11 +3646,10 @@ int check_stealth(void)
if (you.duration[DUR_SILENCE])
stealth -= 50;
- if (stealth < 0)
- stealth = 0;
+ stealth = std::max(0, stealth);
return (stealth);
-} // end check_stealth()
+}
static void _attribute_increase()
{