Skip to content

Commit

Permalink
Use emplace_back in cases of push_back + config_of
Browse files Browse the repository at this point in the history
Again, to make use of the move ctor.
  • Loading branch information
Vultraz committed Apr 4, 2017
1 parent c4064f6 commit 2304148
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game_events/action_wml.cpp
Expand Up @@ -681,7 +681,7 @@ WML_HANDLER_FUNCTION(set_variables,, cfg)

for(std::vector<std::string>::iterator i=split_vector.begin(); i!=split_vector.end(); ++i)
{
data.push_back(config_of(key_name, *i));
data.emplace_back(config_of(key_name, *i));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/playturn_network_adapter.cpp
Expand Up @@ -55,7 +55,7 @@ void playturn_network_adapter::read_from_network()
config child;
child["side_num"] = back["side_drop"];
child["controller"] = back["controller"];
this->data_.push_back(config_of("side_drop", child));
this->data_.emplace_back(config_of("side_drop", child));
back.remove_attribute("side_drop");
back.remove_attribute("controller");
}
Expand Down

0 comments on commit 2304148

Please sign in to comment.