[Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Sep 14, 2002 at 07:17:48PM +0100, Gregory Berkolaiko wrote:
> On Sat, 14 Sep 2002, Raimar Falke wrote:
>
> > > > > > I don't understand:
> > > > > >
> > > > > > void pf_next_get_position(pf_map_t pf_map, struct pf_position *pos)
> > > > > > {
> > > > > > assert(pf_map->last_pos_is_valid);
> > > > > > memcpy(pos, &pf_map->last_pos, sizeof(*pos));
> > > > > > }
> > > > > >
> > > > > > It is clear that we have to overwrite the pos from the caller.
> > > > >
> > > > > Sure. I mean the other parameter: the map. I thought (and still
> > > > > think)
> > > > > that pf_next_get_position should simply read off the position,
> > > > > without
> > > > > iterating the map one step forward, this is the job for pf_next. But
> > > > > this
> > > > > issue is non-critical.
> > > >
> > > > What code does the step forward in the 2-line function
> > > > pf_next_get_position?
> > >
> > > Obviously I meant pf_next_get_path all the way. Sorry. But the comment
> > > still applies.
> >
> > I still don't understand. pf_next_get_path will not do any extra
> > iteration steps.
>
> True true. Your naming confused the hell out of me:
> plain_get_next_position is the function behind pf_next and not behind
> pf_get_next_position as a sane person would expect :)
There is no pf_get_next_position (except in an old comment). There is
a pf_next_get_position. It is quite simple:
- there is pf_get_path
- and there is pf_next and the query functions pf_next_*
And the implementation has:
- plain_get_path (called by pf_get_path and pf_next_get_path) and
- plain_get_next_position (called by pf_next)
> sorry about this, the comment is now void but please register
> complaint about the naming.
> > > 5. What is the last argument to enum known_type (*get_known) (int,
> > > int, struct player *,int) ?
> >
> > Good question. Should be removed. No idea how it got there.
>
> How did it compile with this?
A constant 0 is supplied.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
The trick is to keep breathing.
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, (continued)
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Ross W. Wetmore, 2002/09/13
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14,
Raimar Falke <=
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/14
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/15
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Raimar Falke, 2002/09/16
- [Freeciv-Dev] Re: [Patch] [RFC] Path finding version 14, Gregory Berkolaiko, 2002/09/16
|
|