Author: mordante
Date: Sun Mar 13 19:59:12 2011
New Revision: 48888
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48888&view=rev
Log:
Use empty() instead of comparing size() with 0.
Issue found by cppcheck.
Modified:
trunk/src/ai/testing/ca.cpp
Modified: trunk/src/ai/testing/ca.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/ai/testing/ca.cpp?rev=48888&r1=48887&r2=48888&view=diff
==============================================================================
--- trunk/src/ai/testing/ca.cpp (original)
+++ trunk/src/ai/testing/ca.cpp Sun Mar 13 19:59:12 2011
@@ -831,7 +831,7 @@
moves_.clear();
unit_map::const_iterator leader =
resources::units->find_leader(get_side());
get_villages(get_dstsrc(),get_enemy_dstsrc(),leader);
- if (moves_.size()>0) {
+ if (!moves_.empty()) {
return get_score();
}
return BAD_SCORE;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits