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;
}
Оригинал этой записи. Комментировать можно тут или там.
Любые материалы из этого блога запрещается использовать на сайте livejournal.ru в любой форме и любом объёме
Tags: