[Freeciv-Dev] Re: (PR#10368) RfP: #define ACTIVITY_FACTOR
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10368 >
On Tue, 28 Sep 2004 08:53:59 -0700, Jason Short
<jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10368 >
>
> Marek "Baczek" BaczyÅski wrote:
> > <URL: http://rt.freeciv.org/Ticket/Display.html?id=10368 >
> >
> > On Mon, 27 Sep 2004 19:26:31 -0700, Jason Short
> > <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >
> >
> >>In map.c in map_activity_time() there is a constant value 10. It is
> >>also used by almost all callers. It should be changed to a #define
> >>ACTIVITY_FACTOR in map.h.
> >>
> >>Patch wanted.
> >
> > Changed all 10s to ACTIVITY_FACTOR.
>
> Ahh, but all the callers use the 10 as well. They have to divide by it
> before they can use the final factor (or in case of comparisons, they
> may multiply the other side of the comparison by 10). Hunting down all
> these users may be a bit of work.
I'm lost. I can't find a single related instance of division by 10.
I've been searching like this:
$ grep -nE 'map_\w+_time' `find . -name '*.c' -or -name '*.h'`
(turns out only unittools.c actually use those functions, the rest
uses get_turns_for_activity_at) and this:
$ grep -C 2 -nE '/ ?10[^0-9]' `find . -name '*.c' -or -name '*.h'`
Can you give one example of what to look for?
--
{ Marek Baczyński :: UIN 57114871 :: GG 161671 :: JID imbaczek@xxxxxxxxxxxxx }
{ http://www.vlo.ids.gda.pl/ | imbaczek at poczta fm | http://www.promode.org }
.. .. .. .. ... ... ...... evolve or face extinction ...... ... ... .. .. .. ..
|
|