Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2001:
[Freeciv-Dev] Re: Unsafe assertions. (PR#864)
Home

[Freeciv-Dev] Re: Unsafe assertions. (PR#864)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Unsafe assertions. (PR#864)
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Fri, 27 Jul 2001 12:51:02 -0700 (PDT)

On Fri, 27 Jul 2001, Thue Janus Kristensen wrote:
> On Fri, Jul 27, 2001 at 11:24:58AM -0700, Trent Piepho wrote:
> > On Fri, 27 Jul 2001, Thue Janus Kristensen wrote:
> > I think Jason's way was a lot better.  You have weakened all the assertions 
> > by
> > only checking is_real instead of checking for is_normal.  You also normalize
> > every time, when the author might very well have intended to assert that
> > normalization was NOT necessary.
> 
> Note that I did not weaken the assertions. normalize_map_pos() returns TRUE
> even if the tile is not normalized.

But when the author wrote the assertion, did they mean to assert that it was a
real tile, or that it was a normalized position?  If the former, then why
didn't they use is_real_tile to being with?  Probably because they thought
that normalize_map_pos() would return false if the coordinates were not
normalized.

But who wrote that mess anyway?  Maybe they can shed some light on what the
hell they were thinking.



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