Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: is_real_tile -> is_real_map_pos (PR#1227)
Home

[Freeciv-Dev] Re: is_real_tile -> is_real_map_pos (PR#1227)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: is_real_tile -> is_real_map_pos (PR#1227)
From: jdorje@xxxxxxxxxxxxxxxxxxxxx
Date: Sat, 12 Jan 2002 19:21:54 -0800 (PST)

Ross W. Wetmore wrote:

This should not be just a rename, but fix the definition and use as well.

Many/most of the uses need fixing, but I'm not sure if this should all be done in the same patch. For one thing some of the implementations are disagreed on.

In reality, most of the "fixes" here can just get rid of the is_real_map_pos check entirely. Some can be replaced with CHECK_MAP_POS, some with normalize_map_pos, and some just removed. But there will be no agreement on how to do this, so I'll leave it be for now.


In many cases, the same code is being called 2 or 3 times. In others
the call should be changed to be normalize_map_pos() since this provides
more safety at reduced cost.

Nit: normalize_map_pos is fundamentally more expensive than is_real_tile. The current implementation just happens to violate this.


The rename is such a low priority on its own, that one wonders why take
the effort to do things twice.

To people seeing the code for the first time, the bad naming and lack of documentation will surely be confusing.


jason





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: is_real_tile -> is_real_map_pos (PR#1227), jdorje <=