[Freeciv-Dev] Re: (PR#2370) Path finding
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, Feb 21, 2003 at 10:58:51PM +0000, Gregory Berkolaiko wrote:
> Quoting Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>:
>
> > On Fri, Feb 21, 2003 at 10:25:22PM +0000, Gregory Berkolaiko wrote:
> > > > > > > + */
> > > > > > > + int (*get_MC) (int from_x, int from_y, enum direction8 dir,
> > > > > > > + int to_x, int to_y, void *);
> > > > > >
> > > > > > We should also supply "known".
> > > > >
> > > > > When any user code needs it, it will be added.
> > > >
> > > > Based on this we would have to remove this parameter also from the
> > > > other callbacks. It should be added here and also to is_pos_dangerous.
> > >
> > > Definitely add to is_pos_dangerous, I am surprised it's not there yet.
> > > Definitely not here. I am not having it just for uniformity's sake.
> > > This is a back-bone of the whole module and +- one byte makes a
> > > difference.
> >
> > > Give me a problem that requires "known" here and cannot be solved by
> > existing
> > > call-backs and then we can negotiate.
> >
> > This one extra argument is one extra push for the caller. Thats it. No
> > other cost. gcc doesn't pop but just adjusts the %esp directly. And it
> > has no influence on the called function (if the function doesn't use
> > it). I expect that a push is fast. Very fast since you need it
> > everytime you call a function.
>
> Don't push it on me, man! Since you are not giving me the example
> that needs it, we will assume that none such exists.
That callback were your idea. I have no code which needs this callback
at all.
But your point (add it if current code needs it) is mood. This way we
wouldn't have EC, is_pos_dangerous and TM_*_TIME.
> > > While waiting for comments, I can suggest an alternative: return a
> > > negative
> > number.
> >
> > This is slightly better. But still not clean.
>
> Cleaner than the way you suggest.
I disagree.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"There are three ways to get something done. Do it yourself, hire someone
to do it for you or forbid your kids to do it."
- [Freeciv-Dev] Re: (PR#2370) Path finding, (continued)
- [Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding,
Raimar Falke <=
- [Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/21
- [Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/22
- [Freeciv-Dev] Re: (PR#2370) Path finding, Mike Kaufman, 2003/02/22
- [Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/23
- [Freeciv-Dev] Re: (PR#2370) Path finding, Ross Wetmore, 2003/02/23
- [Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/23
- [Freeciv-Dev] Re: (PR#2370) Path finding, Mike Kaufman, 2003/02/23
- [Freeciv-Dev] Re: (PR#2370) Path finding, Raimar Falke, 2003/02/23
- [Freeciv-Dev] Re: (PR#2370) Path finding, Gregory Berkolaiko, 2003/02/23
|
|