[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: few questions



On Tue, 4 May 1999, Michael Sobolev wrote:

> > You can see an bit of an example of this ShowBroken in apt-get.cc, the
> > GlobOr function returns an iterator range that represents the current or
> > group and steps the input iterator..

> Well, actually, I copied the code from the apt-cache.cc and tried to make use
> of it.  Sometimes it works, sometimes it does.  Let me put few lines of my
> code:

>         if (version.end () == false)
>         {
>             for (pkgCache::DepIterator D = version.DependsList (); D.end () == false; D++)
>             {

The trouble is that you are ++ing D, the GlobOr Function does this for
you, it actually steps to the next entry past the last or element. So by
++ing you are skipping over every other entry.

Jason


Reply to: