void EITCache::WriteChannelToDB(QStringList &value_clauses, uint chanid) { event_map_t * eventMap = channelMap[chanid]; if (!eventMap) { channelMap.remove(chanid); return; } uint size = eventMap->size(); uint updated = 0; uint removed = 0; event_map_t::iterator it = eventMap->begin(); while (it != eventMap->end()) { if (extract_endtime(*it) > lastPruneTime) { if (modified(*it)) { replace_in_db(value_clauses, chanid, it.key(), *it); updated++; *it &= ~(uint64_t)0 >> 1; // mark as synced } } else {
void EITCache::WriteChannelToDB(uint chanid) { event_map_t * eventMap = channelMap[chanid]; if (!eventMap) { channelMap.erase(chanid); return; } uint size = eventMap->size(); uint updated = 0; event_map_t::iterator it = eventMap->begin(); while (it != eventMap->end()) { if (modified(*it) && extract_endtime(*it) > lastPruneTime) { replace_in_db(chanid, it.key(), *it); updated++; *it &= ~(uint64_t)0 >> 1; // mark as synced } it++; }