Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] more small directional cleanups
Home

[Freeciv-Dev] Re: [PATCH] more small directional cleanups

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Cc: Freeciv-dev mailing list <freeciv-dev@xxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] more small directional cleanups
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 19:07:34 -0700 (PDT)

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...




[Prev in Thread] Current Thread [Next in Thread]