Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6380) remove is_real and is_valid sanity variables
Home

[Freeciv-Dev] (PR#6380) remove is_real and is_valid sanity variables

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6380) remove is_real and is_valid sanity variables
From: "John Wheeler" <jdwheeler42@xxxxxxxxx>
Date: Fri, 3 Oct 2003 12:27:39 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[jdorje - Thu Oct  2 23:47:02 2003]:

> Most places in the code use this form:
> 
>    if (!normalize_map_pos(&x, &y)) {
>      assert(0);
>    }

Hmm... for a quick solution, would "assert(normalize_map_pos(&x, &y);" 
work?  I hate getting 'assert(0)' as an error message, because it 
gives absolutely no indication what the problem is.  What I'd much 
rather see is something like:

    if (!normalize_map_pos(&x, &y)) {
      die("Map position %d,%d not normalized.", x, y);
    }

-- 

++JohnWheeler


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