Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2000:
[Freeciv-Dev] patch: (2/4,3/4) player_find_unit_by_id (PR#341)
Home

[Freeciv-Dev] patch: (2/4,3/4) player_find_unit_by_id (PR#341)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] patch: (2/4,3/4) player_find_unit_by_id (PR#341)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Sat, 22 Apr 2000 22:36:23 -0700 (PDT)

The second and third in a set of 4 patches.

The first patch below adds a function player_find_unit_by_id(), similar 
to player_find_city_by_id().  The second patch below uses this function 
to replace many calls like unit_list_find(&pplayer->units, id).  Also 
replaces some reminaing calls like city_list_find(&pplayer->cities, id) 
similarly.

The purpose of this is to allow future optimisations inside
player_find_unit_by_id(), similar to current "citycache" optimisation
which occurs (indirectly) inside player_find_city_by_id().  Currently 
citycache is only in server, and there is no equivalent for units, 
but a subsequent patch (4/4) changes both of these aspects.

-- David

Attachment: player_find_unit_func.diff.gz
Description: GNU Zip compressed data

Attachment: player_find_unit_conv.diff.gz
Description: GNU Zip compressed data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] patch: (2/4,3/4) player_find_unit_by_id (PR#341), David Pfitzner <=