Author: mordante
Date: Sun Mar 13 19:59:15 2011
New Revision: 48889

URL: http://svn.gna.org/viewcvs/wesnoth?rev=48889&view=rev
Log:
Use empty() instead of comparing size() with 0.

Issue found by cppcheck.

Modified:
    trunk/src/attack_prediction.cpp

Modified: trunk/src/attack_prediction.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/attack_prediction.cpp?rev=48889&r1=48888&r2=48889&view=diff
==============================================================================
--- trunk/src/attack_prediction.cpp (original)
+++ trunk/src/attack_prediction.cpp Sun Mar 13 19:59:15 2011
@@ -733,7 +733,7 @@
                        opp.summary[0][opp.u_.hp] = 1.0 - hit_chances_[0];
                        opp.summary[0][std::max<int>(opp.u_.hp - u_.damage, 0)] 
= hit_chances_[0];
                } else {
-                       assert(hit_chances_.size() == 0);
+                       assert(hit_chances_.empty());
                        opp.summary[0][opp.u_.hp] = 1.0;
                }
        } else {


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to