[Freeciv-Dev] (PR#7280) Tile pointer in unit struct
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7280 >
> [i-freeciv-lists@xxxxxxxxxxxxx - Wed Jan 21 08:08:24 2004]:
> The last point could be solved by having functions/macros like:
>
> unit_tile(punit)
> unit_tile_city(punit)
>
> which than use or don't use a cached tile pointer. So what about a
> single new function/macro unit_tile(punit) and than writing
> unit_tile(punit)->city?
But since this whole argument is about speed, the implementation does
matter. If unit_tile is implemented via map_get_tile then you want to
cache it locally. If it's just a pointer lookup you needn't bother.
jason
|
|