Summary: Consolidate calls in pf_tools.c
Submitted by: persia
Submitted on: Thu 10 Jul 2014 08:05:42 AM JST
Priority: 5 - Normal
Status: Ready For Test
Assigned to: persia
Discussion Lock: Any
Planned Release: 2.6.0
Patch #4910 was precisely the major surgery required to apply the changes from
patch #3837 to pf_tools.c, so we can now do that.
Patch #4889 removed attack_move_cost(), and patch #4910 removed the remaining
logic in simple_move_cost(), making it sensible to replace the calls to
simple_move_cost() and overlap_move_cost() with their single-line
implementation (this doesn't reduce the call stack, because these were inline
functions, but it means that the code reads to humans more similarly to how to
it reads to compilers).
Patch #4910 also allows the use of can_occupy_city(), rather than checking the
class flag, reducing the number of places the flag is checked directly.
The attached patch also adjusts a comment not to trigger grep for
UTYF_MARINES, and moves the "Position Dangerous Callbacks" section header
comment above the first position dangerous callback.
Date: Thu 10 Jul 2014 08:05:42 AM JST Name: consolidate-pf_tools-calls.patch
Size: 6kB By: persia
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list