Author: ilor
Date: Mon Mar 23 23:55:09 2009
New Revision: 34073

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34073&view=rev
Log:
backport r34072 to 1.6 (avoid foreach where the container is a rvalue)

Modified:
    branches/1.6/src/unit_animation.cpp

Modified: branches/1.6/src/unit_animation.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/unit_animation.cpp?rev=34073&r1=34072&r2=34073&view=diff
==============================================================================
--- branches/1.6/src/unit_animation.cpp (original)
+++ branches/1.6/src/unit_animation.cpp Mon Mar 23 23:55:09 2009
@@ -554,7 +554,8 @@
                                        .duration(225)
                                        
.blend("0.0,0.5:75,0.0:75,0.5:75,0.0",game_display::rgb(255,0,0)));
                } else {
-                       foreach(std::string hit_type, 
utils::split((**anim_itor)["hits"])) {
+                       std::vector<std::string> v = 
utils::split((**anim_itor)["hits"]);
+                       foreach(std::string hit_type, v) {
                                config tmp = **anim_itor;
                                tmp["hits"]=hit_type;
                                animations.push_back(unit_animation(tmp));


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

Reply via email to