Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
April 2000: [Freeciv-Dev] patch: (2/4,3/4) player_find_unit_by_id (PR#341) |
[Freeciv-Dev] patch: (2/4,3/4) player_find_unit_by_id (PR#341)[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
player_find_unit_func.diff.gz
player_find_unit_conv.diff.gz
|