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.
This commit is contained in:
parent
c218d154e8
commit
cf2fa93f64
1 changed files with 2 additions and 1 deletions
|
@ -553,7 +553,8 @@ void unit_animation::add_anims( std::vector<unit_animation> & animations, const
|
|||
}
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue