Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations
Home

[Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] Re: PATCH: remove map_adjuxt_[xy] invocations
From: Reinier Post <rp@xxxxxxxxxx>
Date: Thu, 4 Oct 2001 09:48:35 +0200

On Wed, Oct 03, 2001 at 04:45:30PM -0400, Jason Dorje Short wrote:
> Raimar Falke wrote:
> >
> > assert(is_normal_map_pos(x,y)) == CHECK_MAP_POS(x,y)
> 
> Hmmm, we had this argument before.  I and (I think) a couple other
> people thought that asssert(is_normal...) is easier to read than
> CHECK_MAP_POS.
> 
> What are other people's opinions?

I think so, too.  From Raimar's patch:

| #define CHECK_MAP_POS(x,y) do{\
|     int dx = x, dy = y; \
|     assert(normalize_map_pos(&dx, &dy)); \
|     assert(x == dx && y == dy); \
|   } while(0)
| #endif
 
It's checking for side effects - surely this isn't permanent.

> jason

-- 
Reinier


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