[mythtv] mythtv/master commit: 38f8fb1f2 by David Engel (gigem)
David Engel
david at istwok.net
Mon Feb 28 04:30:06 UTC 2011
On Sun, Feb 27, 2011 at 01:35:08PM -0800, Gavin Hurlbut wrote:
> Just curious. It seems that the if/else if structures could just be if/else.
> Any particular reason to check the status twice?
>
> If(a) else if(!a) seems odd to me.
Perhaps I'm missing something, but that isn't the construct in the
code. It is "if(a) else if (!b)", where a is rsRecording and b is
rsRecorded. The intent is to perform the following transitions.
rsRecording => rsRecorded
rsRecorded => rsRecorded (no change)
all else => rsFailed
I supp0se the code could be changed to the following, but I don't know
that it's necessarily any clearer.
if (recinfo.GetRecordingStatus() == rsRecording ||
recinfo.GetRecordingStatus() == rsRecorded)
recinfo.SetRecordingStatus(rsRecorded);
else
recinfo.SetRecordingStatus(rsFailed);
David
--
David Engel
david at istwok.net
More information about the mythtv-dev
mailing list