[Freeciv-Dev] Re: the directional system
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke (hawk@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> On Fri, Sep 07, 2001 at 04:51:36AM -0700, Trent Piepho wrote:
> > +#define DIR_REVERSE(dir) (((dir) + 4) % 8)
> > +#define DIR_REVERSE(dir) (((dir) + 4) & 7)
> $ gcc -S -O2 a.c
> $ cat a.s
Nice demonstration, but it only shows that your version of gcc can handle
this optimization -- there may be other compilers out there that don't.
It's safer to use the bitwise AND operation.
--
Greg Wooledge | "Truth belongs to everybody."
greg@xxxxxxxxxxxx | - The Red Hot Chili Peppers
http://wooledge.org/~greg/ |
pgp7_suFZAeN1.pgp
Description: PGP signature
- [Freeciv-Dev] the directional system, Jason Dorje Short, 2001/09/07
- [Freeciv-Dev] Re: the directional system, Trent Piepho, 2001/09/07
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/07
- [Freeciv-Dev] Re: the directional system,
Greg Wooledge <=
- [Freeciv-Dev] Re: the directional system, Ross W. Wetmore, 2001/09/07
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/08
- [Freeciv-Dev] Re: the directional system, Gaute B Strokkenes, 2001/09/11
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/12
- [Freeciv-Dev] Re: the directional system, Gaute B Strokkenes, 2001/09/13
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/14
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/14
- [Freeciv-Dev] Re: the directional system, Reinier Post, 2001/09/16
- [Freeciv-Dev] Re: the directional system, Raimar Falke, 2001/09/16
- [Freeciv-Dev] Re: the directional system, Reinier Post, 2001/09/17
|
|