URL:
  <http://gna.org/patch/?4921>

                 Summary: Consolidate calls in pf_tools.c
                 Project: Freeciv
            Submitted by: persia
            Submitted on: Thu 10 Jul 2014 08:05:42 AM JST
                Category: ai
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: persia
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.6.0

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 10 Jul 2014 08:05:42 AM JST  Name: consolidate-pf_tools-calls.patch 
Size: 6kB   By: persia

<http://gna.org/patch/download.php?file_id=21337>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?4921>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to