[Freeciv-Dev] Re: [PATCH] more small directional cleanups
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, 20 Aug 2001, Ross W. Wetmore wrote:
> I think we are all agreed that that is about the only known use for it.
>
> So you agree that a comment to stop people from using it where they
> shouldn't is a reasonable thing to add, yes?
I suppose that does make sense, I can see how something might think that
if(!is_normal_tile(x,y)) normalize_map_pos(&x,&y) was a good idea when really
the extra check serves no purpose.
It's not entirely useless though. normalize_map_pos takes pointer argument,
so the compiler will have to move x and y out of registers and into memory.
If most positions don't need to be normalized, then checking for normality
(normalness? normalizedness?) using inlined code, like is_normal_tile() could
be, would just be a few machine instructions that would save a function call
and some register saving. But I'm just grasping at straws here...
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, (continued)
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Ross W. Wetmore, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Raimar Falke, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Ross W. Wetmore, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Trent Piepho, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Raimar Falke, 2001/08/21
- Message not available
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Ross W. Wetmore, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups,
Trent Piepho <=
- Message not available
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Ross W. Wetmore, 2001/08/21
[Freeciv-Dev] Re: [PATCH] more small directional cleanups, Jason Dorje Short, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Trent Piepho, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Raimar Falke, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Jason Dorje Short, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Raimar Falke, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Jason Dorje Short, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Trent Piepho, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] more small directional cleanups, Raimar Falke, 2001/08/22
Message not available[Freeciv-Dev] Re: [PATCH] more small directional cleanups, Ross W. Wetmore, 2001/08/20
|
|