Author: ilor
Date: Mon Mar 23 23:54:27 2009
New Revision: 34072
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34072&view=rev
Log:
Avoid a use of foreach where the container is a rvalue (from utils::split) by
using a local var to hold the value, since apparently it can break on some
compilers (sunpro) and such constructs seem to not be used elsewhere in the
code.
Modified:
trunk/src/unit_animation.cpp
Modified: trunk/src/unit_animation.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=34072&r1=34071&r2=34072&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Mon Mar 23 23:54:27 2009
@@ -553,7 +553,8 @@
}
else
{
- foreach (const std::string &hit_type,
utils::split(anim["hits"]))
+ std::vector<std::string> v = utils::split(anim["hits"]);
+ foreach (const std::string &hit_type, v)
{
config tmp = anim;
tmp["hits"] = hit_type;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits