[mythtv] possible error in auto-shutdown routine

Andrew Mahone andrewmahone at eml.cc
Thu Mar 4 08:03:59 EST 2004


On Thursday 04 March 2004 07:40, Marc Kessels wrote:
> 919			if ((recIter = reclist.begin()) !=
> 920				reclist.end())
>
> line 919 and 920 contain the error if I am not mistaking: I suppose the
> assignment should be a compare (==) because now recIter contains the first
> recording in the list, and not the first recording to still be recorded.
> Therefor the time towards the next recording calculated in 922-923 becomes
> negative.

This isn't any of my code, so I'm not that familiar with it, but I don't think 
that 919 is a bug.  It's assigning the first position in reclist to recIter 
(an iterator), and comparing it to the last position.  If they're not equal, 
there's at least one value in the list (IIRC end() returns an iterator *past* 
the final list item).  The iterator is then used in 922 to refer to the first 
item in recList - if this list is sorted, this would be the next recording, 
which seems reasonable to me.
-- 
Andrew Mahone
andrewmahone AT eml DOT cc


More information about the mythtv-dev mailing list