Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [PATCH] check_map_pos change (PR#1031)
Home

[Freeciv-Dev] Re: [PATCH] check_map_pos change (PR#1031)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] check_map_pos change (PR#1031)
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Tue, 30 Oct 2001 15:53:00 +0000

On Tue, 30 Oct 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Tue, Oct 30, 2001 at 02:45:01AM +0000, Gaute B Strokkenes wrote:
>> On Mon, 29 Oct 2001, vze2zq63@xxxxxxxxxxx wrote:
>> 
>> I propose the following:
> 
> Ok, but
> 
>>  signed short map_get_continent(int x, int y)
>>  {
>> -  if (!normalize_map_pos(&x, &y))
>> +  if (!normalize_map_pos(&x, &y)) /* XXX */
> 
> ??

[snip similar stuff]

> As stated, we want normal map positions in all cases.

I didn't check that making it crash here would work.  If someone else
did, then we can remove them here too.

>> +#ifndef NDEBUG
>> +#define CHECK_POS(x,y) \
>> +  (assert(is_normal_map_pos((x),(y))), TRUE)
>> +#else
>> +#define CHECK_POS(x,y) TRUE
>> +#endif
> 
> Replace with 
> #define CHECK_POS(x,y) (assert(is_normal_map_pos((x),(y))), TRUE)

The idea was that we want to change from #ifndef NDEBUG to #ifdef
DEBUG in a few weeks.  But it obviously doesn't matter.

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
I don't think you fellows would do so much RAPING and PILLAGING if you
 played more PINBALL and watched CABLE TELEVISION!!


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