Actions
Feature #1799
closedAPI refactor - double pointer was never used; single pointer suffices.
Start date:
12/04/2025
Due date:
% Done:
0%
Estimated time:
Description
unit_assign_specific_activity_target()
unit_activity_handling_targeted()
unit_activity_targeted_internal()
do_action_activity_targeted()
all use a double pointer for the extra_type structure, but only use it equivalently as a single pointer.
This patch refactors these APIs to use the more straightforward single pointer.
Files
Updated by Marko Lindqvist 9 days ago
unit_assign_specific_activity_target():
- *target = tgt;
+ target = tgt;
return;
The new assignment does nothing sensible. It just sets local variable just before the function returns. Old assignment set target on the caller side via the pointer.
...and at least action_sub_target_id_for_action() depended on that:
unit_assign_specific_activity_target(actor_unit, &activity,
- action_number(paction), &pextra);
+ action_number(paction), pextra);
if (pextra != NULL) {Updated by Marko Lindqvist 9 days ago
- Status changed from New to Rejected
- Assignee set to Marko Lindqvist
Actions