Use an output parameter the proper way
This commit is contained in:
parent
2d0a2ea8c0
commit
cfeddc7041
1 changed files with 4 additions and 2 deletions
|
@ -78,9 +78,11 @@ void move::execute()
|
|||
arrow_->set_alpha(ALPHA_HIGHLIGHT);
|
||||
|
||||
static const bool show_move = false;
|
||||
map_location* next_unit = NULL; //Set to something else than null to get final unit location in this out parameter
|
||||
::move_unit(NULL, arrow_->get_path(), &recorder, resources::undo_stack, show_move, next_unit,
|
||||
map_location next_unit;
|
||||
::move_unit(NULL, arrow_->get_path(), &recorder, resources::undo_stack, show_move, &next_unit,
|
||||
get_current_team().auto_shroud_updates());
|
||||
// next_unit now contains the final unit location
|
||||
// if that isn't needed, pass NULL rather than &next_unit
|
||||
}
|
||||
|
||||
modifier_ptr move::apply_temp_modifier(unit_map& unit_map)
|
||||
|
|
Loading…
Add table
Reference in a new issue