[vlc-devel] [PATCHv6] dcp: Creation of access-demux module for DCP

Nicolas Bertrand nicoinattendu at gmail.com
Thu Nov 28 11:36:09 CET 2013


<nitpicking> this could be done in a more compact way with something like
>
> static const string names[] = {"Path", "VolumeIndex", "Offset",
>                                "Length"};
> chunk_tag = CHUNK_UNKNOWN;
> for(ChunkTag_t i = 0; i < CHUNK_LENGTH; i++)
>   if( node == names[i])
>   {
>     chunk_tag = i+1;
>     break;
>   }
> if(chunk_tag == CHUNK_UNKNOWN)
>   return -1;


Hello
I try to implement this table
But have a compilation error for line
for(ChunkTag_t i = 0; i < CHUNK_LENGTH; i++)
ERROR   : ../../modules/access/dcp/dcpparser.cpp:153: 36:  invalid
conversion from 'int' to 'ChunkTag_t' [-fpermissive]
ERROR   : ../../modules/access/dcp/dcpparser.cpp:153: 58:  no
'operator++(int)' declared for postfix '++' [-fpermissive]

Is there a way to overridde that error ( like a typedef for ChunkTag_t')

defined this way
typedef enum {
    CHUNK_UNKNOWN = 0,
    CHUNK_PATH,
    CHUNK_VOL_INDEX,
    CHUNK_OFFSET,
    CHUNK_LENGTH
} ChunkTag_t;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20131128/2f2ca02d/attachment.html>


More information about the vlc-devel mailing list