[mythtv] Small code improvement.

Isaac Richards ijr at po.cwru.edu
Sun May 11 01:51:37 EDT 2003

On Sunday 11 May 2003 12:38 am, Matt Zimmerman wrote:
> On Sun, May 11, 2003 at 12:18:15PM +1000, michael at optusnet.com.au wrote:
> > Would you object if I at least moved all the magic numbers to variable,
> > and consolidated them in one place?
> >
> > I'm finding some areas of the code very difficult to understand.  Would
> > you object to a patch to simplified some things, and added a bunch of
> > comments?
> Some of this code has gotten a bit tangled as it has grown.  I don't think
> anyone would object to it being cleaned up, as long as:
> - the behaviour doesn't change
> - it really is simpler, and not just different or smaller.  This means that
>   it is easier for everyone to understand, not just you

Exactly -- the current code is _explicit_ as to which mode it's in (normal 
file, or ringbuffer).  Behavior that changes depending on if you give it a 
smaller file size isn't simpler, it's non-obvious.  Potentially, the 
ringbuffer class could be separated into two different classes with a base 
class providing the common interface, but they'd share so much code I 
wouldn't think it to be worth the effort.


More information about the mythtv-dev mailing list