Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2003:
[Freeciv-Dev] (PR#6918) GUI for CMA should allow zero weights
Home

[Freeciv-Dev] (PR#6918) GUI for CMA should allow zero weights

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6918) GUI for CMA should allow zero weights
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 5 Dec 2003 13:20:23 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6918 >

> [i-freeciv-lists@xxxxxxxxxxxxx - Wed Nov 26 09:33:35 2003]:
> Allowing 0 at the frontend. Zero mapps to 1 while the other weights
> are multiplied by 1000.

I guess we could do that, but then we don't save any time.  A quick
experiment indicates that we don't output bad results or crash when we
set trade and lux weights to exactly zero.  What were the problems with
zero weights?


> > The current code uses a lot of short and char values so at first
> > glance multiplying by 1k might actually be a problem (one easily
> > remedied of course).
>
> Possible.

Actually not a problem.  The function calc_fitness uses int, which
should be wide enough (unless we go for 16-bit platforms) while we don't
use the weights anywhere else.


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6918) GUI for CMA should allow zero weights, Benoit Hudson <=