fix a msvc build error and some c++ correctness
This commit is contained in:
parent
6610fe2ac3
commit
19e0e8eb41
1 changed files with 4 additions and 4 deletions
|
@ -542,12 +542,12 @@ void replay::undo()
|
|||
}
|
||||
else
|
||||
{
|
||||
const config *child = &cmd_second.child("recruit");
|
||||
if (!*child) child = &cmd_second.child("recall");
|
||||
if (*child) {
|
||||
const config *chld = &cmd_second.child("recruit");
|
||||
if (!*chld) chld = &cmd_second.child("recall");
|
||||
if (*chld) {
|
||||
// A unit is being un-recruited or un-recalled.
|
||||
// Remove unsynced commands that would act on that unit.
|
||||
map_location src(*child, game_events::get_state_of_game());
|
||||
map_location src(*chld, game_events::get_state_of_game());
|
||||
for (std::vector<config::child_list::const_iterator>::iterator async_cmd =
|
||||
async_cmds.begin(); async_cmd != async_cmds.end(); async_cmd++)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue