Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6298) civserver: city.c:895: can_establish_trade_route
Home

[Freeciv-Dev] (PR#6298) civserver: city.c:895: can_establish_trade_route

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: cameron@xxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6298) civserver: city.c:895: can_establish_trade_route: Assertion `can_cities_trade(pc1, pc2)' failed
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Oct 2003 13:53:44 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[remi - Sat Sep 27 06:45:23 2003]:

> Cameron Morland wrote:
> 
> >[cameron - Fri Sep 26 17:50:58 2003]:
> >
> >>I get the assertion
> >>
> >>civserver: city.c:895: can_establish_trade_route: Assertion
> >>`can_cities_trade(pc1, pc2)' failed
> >>
> >can_establist_trade_route() assumes that we've already checked
> >can_cities_trade(), and asserts as much. So, we need to check that if 
> >we haven't already.
> >
> I really don't understand this behviour. Why can_establish_trade_route 
> can't return FALSE instead of dying when can_cities_trade failed?

I believe Rafal designed it that way to be faster, since in about half
of the cases can_establish_trade_route is only called after
can_cities_trade.  I seriously doubt this effect is significant, so we
might want to change it.

jason



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6298) civserver: city.c:895: can_establish_trade_route: Assertion `can_cities_trade(pc1, pc2)' failed, Jason Short <=