Никогда не заглядывай в пирожок…

struct uniqueEPGKey
{
        int sid, onid, tsid;
...
        bool operator==(const uniqueEPGKey &a) const
        {
                return !memcmp( &sid, &a.sid, sizeof(int)*3);
        }

Молодцы, блин. Сэкономили полстрочки кода.

Upd: “м-мать”, — звонко откликнулось эхо.

unsigned int magic=0;
fread( &magic, sizeof(int), 1, f);
if (magic != 0x98765432)
{
        eDebug("[EPGC] epg file has incorrect byte order.. dont read it");
        fclose(f);
        return;
}
This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply