> This is my first patch so please forgive and correct my missteps.
I'll try to take it easy...
Couple comments/questions.
When submitting patches, please observe the coding style of the file
you are patching. In the case of autoexpire.cpp and most Myth files,
that means no tabs, 80-column lines, and indent each sublevel 4 spaces.
There, that was taking it pretty easy. Now the question(s). :)
+ vector<ProgramInfo *>::reverse_iterator i;
+ ProgramInfo *pginfo;
+ bool done = false;
+
+ pginfo = *(expireList.rend()); // error
condition
Is there a reason for this, why not just set pginfo = NULL when
declared above?
+ // Couldn't find the file.
Delete would probally fail, so find another file.
+ VERBOSE(VB_ALL, QString("ERROR
when trying to autoexpire file: %1. File "
+ // Couldn't find any autoexpire files.
+ VERBOSE(VB_ALL, QString("ERROR when
trying to autoexpire files. "
Might want to make these VERBOSE calls VB_IMPORTANT.
+ vector<ProgramInfo *>::iterator
forward_iterator;
+ for (forward_iterator =
expireList.begin();
+ (forward_iterator !=
expireList.end()) && (*forward_iterator != pginfo);
+ forward_iterator++)
+ {}
+
delete pginfo;
- expireList.erase(expireList.end() - 1);
+ expireList.erase(forward_iterator);
Do you really need this loop above? Can't you just use the "i" iterator
you were using above since that is pointing to the item we're expiring?
--
Chris
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev