[vlc-devel] [PATCH] demux/ty: Demux: replace if-else with switch

Filip Roséen filip at atch.se
Mon Mar 20 14:46:15 CET 2017


Hi Francois,

On 2017-03-20 14:37, Francois Cartegnie wrote:

> Le 20/03/2017 à 14:26, Filip Roséen a écrit :
> > A switch should be easier to maintain, while also improving
> > readability.
> 
> 
> > +        case 0x01: /* closed caption */
> > +        case 0x02: /* XDS */
> > +            DemuxRecCc( p_demux, p_rec, p_block_in );
> > +            break;
> 
> Misleading incorrect attribution of comments to single values.

Thank you for pointing that out, I misread the previous comments and
thought they applied to each of the two values seperately (which I
know understand is of course not the case).

See attached patch for a fixup (since the patch got applied while you
were replying).

All the best,\
Filip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170320/6524a9fd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-demux-ty-Demux-fix-comment-related-to-closed-caption.patch
Type: text/x-diff
Size: 1308 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170320/6524a9fd/attachment.patch>


More information about the vlc-devel mailing list