From 6b01cb1a8f1948b9a8a6fe6ea2c0be2cc082731c Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 19 Jun 2008 20:49:10 +0000 Subject: Simplify. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5990 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 9792d59602..2b1e89e019 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2680,10 +2680,7 @@ void melee_attack::player_calc_hit_damage() // This doesn't actually modify damage. -- bwr // It only chooses the appropriate verb. - damage_done = player_weapon_type_modify( damage_done ); - - if (damage_done < 0) - damage_done = 0; + damage_done = std::max(0, player_weapon_type_modify(damage_done)); } int melee_attack::calc_to_hit(bool random) -- cgit v1.2.3-54-g00ecf