Author: mordante
Date: Sun Mar 13 19:59:17 2011
New Revision: 48890
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48890&view=rev
Log:
Use empty() instead of comparing size() with 0.
Issue found by cppcheck.
Modified:
trunk/src/editor/editor_controller.cpp
Modified: trunk/src/editor/editor_controller.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor/editor_controller.cpp?rev=48890&r1=48889&r2=48890&view=diff
==============================================================================
--- trunk/src/editor/editor_controller.cpp (original)
+++ trunk/src/editor/editor_controller.cpp Sun Mar 13 19:59:17 2011
@@ -169,7 +169,7 @@
foreach (const config &i, game_config.child_range("brush")) {
brushes_.push_back(brush(i));
}
- if (brushes_.size() == 0) {
+ if (brushes_.empty()) {
ERR_ED << "No brushes defined!";
brushes_.push_back(brush());
brushes_[0].add_relative_location(0, 0);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits