patchFreeciv - Patches: patch #3868, Refactor unleash_barbarians()...

Show feedback again

patch #3868: Refactor unleash_barbarians() terrain analysis loop

Submitted by:  Emmet Hikory <persia>
Submitted on:  Mon Apr 22 00:27:29 2013  
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Sat Apr 27 21:39:57 2013, SVN revision 22780:

Refactor unleash_barbarians() terrain analysis so that
is_ocean() and is_non_allied_unit_tile() are called just
once for each tile.

Patch by Emmet Hikory

See patch #3868

(Browse SVN revision 22780)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon Apr 22 00:27:29 2013, original submission:

Avoid calling is_ocean() and is_non_allied_terrain() twice separately for is_free_land() and is_free_sea(). Instead, drop the helper functions, and consolidate the logic in the terrain analysis loop, with a short-circuit to never call is_ocean() when is_non_allied_terrain().

Emmet Hikory <persia>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #17800:  refactor-unleash_barbarians.patch added by persia (3kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by cazfi (Updated the item)
  • -unavailable- added by persia (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat Apr 27 21:40:07 2013cazfiStatusReady For Test=>Done
    Mon Apr 22 22:12:01 2013cazfiStatusNone=>Ready For Test
      Assigned toNone=>cazfi
      Planned Release=>2.5.0
    Mon Apr 22 00:27:29 2013persiaAttached File-=>Added refactor-unleash_barbarians.patch, #17800
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup