Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3010) core dump from client air goto
Home

[Freeciv-Dev] (PR#3010) core dump from client air goto

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#3010) core dump from client air goto
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Sat, 8 Feb 2003 10:46:06 -0800
Reply-to: rt.freeciv.org@xxxxxxxxxxxxxx

[glip - Fri Feb  7 20:53:56 2003]:

> > The solution is simple: don't set warmap_cost until right before
> it's used.
> 
> You chose a strange place to set things.  It will be reset (unless
> optimized) every time a better route is found -- and that could be
> lots.
> 
> Why not set it right after init_warmap is called?

To me it seems very natural to set it right before it it used.  But it
is true this means a couple of extra operations every now and then,
which could be significant since this code is called so often.

The alternative is to put the code right after warmap is created in
init_warmap.  But you must be sure you've caught all cases, and you must
also still initialize it at the beginning of the function.

jason



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