[Freeciv-Dev] Re: [PATCH] is_normal_tile function
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 09:58 PM 8/15/01 +0100, you wrote:
>> > > +int is_normal_tile(int x, int y)
>> > > +{
>> > > + return 0 <= y && y < map.ysize && 0 <= x && x < map.xsize;
>> > > +}
>I don't like it either but since it's virtually everywhere in Ross' patch
>and I'm sure it's going to be accepted sooner or later, maybe things
>should be more uniform?
It took me a few seconds to get that function...
But really, all it needs is parentheses, right?
return (0 <= y) && (y < map.ysize) && (0 <= x) && (x < map.xsize);
That looks good to me... don't think we -really- need to cast everything as
well.
Though for preference, I'd rearrange it.
return (y > 0) && (y < map.ysize) && (x > 0) && (x < map.xsize);
--
Asher Densmore-Lynn <jesdynf@xxxxxx>
- [Freeciv-Dev] Re: [PATCH] is_normal_tile function,
Asher Densmore-Lynn <=
|
|