From 6e4f84448e49f7a69eb57ca2a54a474fd9da8632 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 3 Jan 2015 22:21:05 +0000 Subject: Use native for instead BOOST_FOREACH --- p2pvr/daemon/dbClient.cpp | 2 +- p2pvr/daemon/globalDevices.cpp | 10 ++++----- p2pvr/daemon/maintenance/events.cpp | 2 +- p2pvr/daemon/maintenance/network.cpp | 8 +++---- p2pvr/daemon/maintenance/services.cpp | 2 +- p2pvr/daemon/muxedFileSink.cpp | 4 ++-- p2pvr/daemon/pch.hpp | 1 - p2pvr/daemon/recorder.cpp | 4 ++-- p2pvr/daemon/schedulers/bitDumbScheduler.cpp | 4 ++-- p2pvr/daemon/schedules.cpp | 32 ++++++++++++++-------------- p2pvr/daemon/si.cpp | 2 +- p2pvr/daemon/unittests/testMaint.cpp | 4 ++-- p2pvr/devices/localDevices.cpp | 2 +- p2pvr/devices/mockTuner.cpp | 3 +-- p2pvr/devices/pch.hpp | 1 - p2pvr/devices/tuner.cpp | 2 +- p2pvr/dvb/pch.hpp | 1 - p2pvr/dvb/siParsers/event.cpp | 1 - p2pvr/lib/containerIterator.h | 7 +++--- p2pvr/lib/mapIterator.h | 7 +++--- p2pvr/lib/muxer.cpp | 2 +- p2pvr/lib/pch.hpp | 1 - p2pvr/lib/serviceStreamer.cpp | 2 +- p2pvr/lib/singleIterator.h | 5 ++--- 24 files changed, 50 insertions(+), 59 deletions(-) diff --git a/p2pvr/daemon/dbClient.cpp b/p2pvr/daemon/dbClient.cpp index 8267584..de4b926 100644 --- a/p2pvr/daemon/dbClient.cpp +++ b/p2pvr/daemon/dbClient.cpp @@ -14,7 +14,7 @@ DatabaseClient::SqlMergeColumnsInserter(SqlMergeTask * merge, const std::string void DatabaseClient::onAllDatasources(const DataSourceCall & call) const { - BOOST_FOREACH(const CommonObjects::DataSources::value_type & ds, CommonObjects::datasources) { + for (const CommonObjects::DataSources::value_type & ds : CommonObjects::datasources) { call(ds.second); } } diff --git a/p2pvr/daemon/globalDevices.cpp b/p2pvr/daemon/globalDevices.cpp index 4368cea..79fa36a 100644 --- a/p2pvr/daemon/globalDevices.cpp +++ b/p2pvr/daemon/globalDevices.cpp @@ -16,7 +16,7 @@ P2PVR::TunerPrx GlobalDevices::GetTunerSpecific(const DVBSI::DeliveryPtr & delivery, const Ice::Current & ice) { auto ic = ice.adapter->getCommunicator(); - BOOST_FOREACH(const auto & pool, Devices) { + for (const auto & pool : Devices) { try { auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool)); return poolprx->GetTunerSpecific(delivery); @@ -31,7 +31,7 @@ P2PVR::TunerPrx GlobalDevices::GetTunerAny(short type, const DVBSI::DeliveryPtr & delivery, const Ice::Current & ice) { auto ic = ice.adapter->getCommunicator(); - BOOST_FOREACH(const auto & pool, Devices) { + for (const auto & pool : Devices) { try { auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool)); return poolprx->GetTunerAny(type, delivery); @@ -46,7 +46,7 @@ P2PVR::PrivateTunerPrx GlobalDevices::GetPrivateTuner(short type, const Ice::Current & ice) { auto ic = ice.adapter->getCommunicator(); - BOOST_FOREACH(const auto & pool, Devices) { + for (const auto & pool : Devices) { try { auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool)); return poolprx->GetPrivateTuner(type); @@ -61,7 +61,7 @@ void GlobalDevices::ReleaseTuner(const P2PVR::TunerPrx & tuner, const Ice::Current & ice) { auto ic = ice.adapter->getCommunicator(); - BOOST_FOREACH(const auto & pool, Devices) { + for (const auto & pool : Devices) { auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool)); poolprx->ReleaseTuner(tuner); } @@ -72,7 +72,7 @@ GlobalDevices::TunerCount(const Ice::Current & ice) { int total = 0; auto ic = ice.adapter->getCommunicator(); - BOOST_FOREACH(const auto & pool, Devices) { + for (const auto & pool : Devices) { try { auto poolprx = P2PVR::DevicesPrx::checkedCast(ic->stringToProxy(pool)); total += poolprx->TunerCount(); diff --git a/p2pvr/daemon/maintenance/events.cpp b/p2pvr/daemon/maintenance/events.cpp index f075a32..e309f39 100644 --- a/p2pvr/daemon/maintenance/events.cpp +++ b/p2pvr/daemon/maintenance/events.cpp @@ -71,7 +71,7 @@ class SiEventsMerger : public IHaveSubTasks { void executeChildren(ExecContext * ec) const { - BOOST_FOREACH(const Tasks::value_type & sq, normal) { + for (const Tasks::value_type & sq : normal) { sq->execute(ec); } } diff --git a/p2pvr/daemon/maintenance/network.cpp b/p2pvr/daemon/maintenance/network.cpp index d9ce0ec..283e6fe 100644 --- a/p2pvr/daemon/maintenance/network.cpp +++ b/p2pvr/daemon/maintenance/network.cpp @@ -16,9 +16,9 @@ class SiNetworkInformationMerger : public SiNetworkInformationParser { bool HandleTable(DVBSI::NetworkPtr n) { Logger()->messagebf(LOG_DEBUG, "Network Id: %d Name: %s", n->NetworkId, *n->Name); - BOOST_FOREACH(const auto & ts, n->TransportStreams) { + for (const auto & ts : n->TransportStreams) { Logger()->messagebf(LOG_DEBUG, "\tTransport Stream Id: %d Original Network Id: %d", ts->TransportStreamId, ts->OriginalNetworkId); - BOOST_FOREACH(const auto & s, ts->Services) { + for (const auto & s : ts->Services) { Logger()->messagebf(LOG_DEBUG, "\t\tService Id: %d Service Type: %d", s.ServiceId, s.ServiceType); } if (ts->Terrestrial) { @@ -42,7 +42,7 @@ class SiNetworkInformationMerger : public SiNetworkInformationParser { SqlMergeTask mergeDvbt("postgres", "delivery_dvbt"); CreateColumns(boost::bind(&DatabaseClient::SqlMergeColumnsInserter, &mergeDvbt, _1, _2)); - BOOST_FOREACH(const auto & s, n->TransportStreams) { + for (const auto & s : n->TransportStreams) { if (s->Terrestrial) { mergeDvbt.sources.insert(new SingleIterator(&s->Terrestrial)); } @@ -52,7 +52,7 @@ class SiNetworkInformationMerger : public SiNetworkInformationParser { SqlMergeTask mergeServices("postgres", "services"); CreateColumns(boost::bind(&DatabaseClient::SqlMergeColumnsInserter, &mergeServices, _1, _2)); - BOOST_FOREACH(const auto & s, n->TransportStreams) { + for (const auto & s : n->TransportStreams) { mergeServices.sources.insert(new ContainerIterator(&s->Services)); } mergeServices.loadComplete(commonObjects); diff --git a/p2pvr/daemon/maintenance/services.cpp b/p2pvr/daemon/maintenance/services.cpp index 55409c2..2030cf8 100644 --- a/p2pvr/daemon/maintenance/services.cpp +++ b/p2pvr/daemon/maintenance/services.cpp @@ -16,7 +16,7 @@ class SiServicesMerger : public SiServicesParser { bool HandleTable(DVBSI::TransportStreamPtr ts) { Logger()->messagebf(LOG_DEBUG, "Transport Stream Id: %d Original Network Id: %s", ts->TransportStreamId, ts->OriginalNetworkId); - BOOST_FOREACH(const auto & s, ts->Services) { + for (const auto & s : ts->Services) { Logger()->messagebf(LOG_DEBUG, "\tService Id: %d Name: %s Type: %d, Provider: %s, DefaultAuthority: %s, RunningStatus %d FreeCaMode %d", s->ServiceId, (s->Name ? *s->Name : "?"), (s->Type ? *s->Type : -1), (s->ProviderName ? *s->ProviderName : "?"), (s->DefaultAuthority ? *s->DefaultAuthority : "?"), diff --git a/p2pvr/daemon/muxedFileSink.cpp b/p2pvr/daemon/muxedFileSink.cpp index 4245873..3008aa7 100644 --- a/p2pvr/daemon/muxedFileSink.cpp +++ b/p2pvr/daemon/muxedFileSink.cpp @@ -14,7 +14,7 @@ MuxedFileSink::MuxedFileSink(const boost::filesystem::path & t, const std::strin { std::vector params; boost::algorithm::split(params, cmd, isspace, boost::algorithm::token_compress_on); - BOOST_FOREACH(auto & c, params) { + for (auto & c : params) { if (c == "${TARGET}") { c = t.string(); } @@ -116,7 +116,7 @@ MuxedFileSink::ReadMuxer(int waitTime) const buf.resize(len); std::vector lines; boost::algorithm::split(lines, buf, boost::algorithm::is_any_of("\r\n\f"), boost::algorithm::token_compress_on); - BOOST_FOREACH(const auto & line, lines) { + for (const auto & line : lines) { if (line.empty()) continue; Logger()->messagebf(LOG_INFO, "Muxer::%p > %s", this, line); } diff --git a/p2pvr/daemon/pch.hpp b/p2pvr/daemon/pch.hpp index bf16cef..f34156e 100644 --- a/p2pvr/daemon/pch.hpp +++ b/p2pvr/daemon/pch.hpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/p2pvr/daemon/recorder.cpp b/p2pvr/daemon/recorder.cpp index 2580e84..3c97fc6 100644 --- a/p2pvr/daemon/recorder.cpp +++ b/p2pvr/daemon/recorder.cpp @@ -33,13 +33,13 @@ void Recorder::RefreshSchedules(const Ice::Current &) { std::lock_guard g(lock); - BOOST_FOREACH(auto & t, pendingRecordings) { + for (auto & t : pendingRecordings) { timer->cancel(t); } pendingRecordings.clear(); auto schedules = P2PVR::SchedulesPrx::checkedCast(adapter->createProxy(adapter->getCommunicator()->stringToIdentity("Schedules"))); auto si = P2PVR::SIPrx::checkedCast(adapter->createProxy(adapter->getCommunicator()->stringToIdentity("SI"))); - BOOST_FOREACH(const auto & s, schedules->GetScheduledToRecord()) { + for (const auto & s : schedules->GetScheduledToRecord()) { if (std::find_if(currentRecordings.begin(), currentRecordings.end(), [&s](const CurrentPtr & c) { return s->ScheduleId == c->schedule->ScheduleId && s->EventUid == c->event->EventUid; }) != currentRecordings.end()) { diff --git a/p2pvr/daemon/schedulers/bitDumbScheduler.cpp b/p2pvr/daemon/schedulers/bitDumbScheduler.cpp index f3cf5fb..eb40431 100644 --- a/p2pvr/daemon/schedulers/bitDumbScheduler.cpp +++ b/p2pvr/daemon/schedulers/bitDumbScheduler.cpp @@ -22,7 +22,7 @@ class TheBitDumbScheduler : public EpisodeGroup { if (complexityLevel > 2 << 16) { auto current = showings.size(); for (EpisodesIter ne = e; ne != episodes.end(); ne++) { - BOOST_FOREACH(const auto & s, (*ne)->showings) { + for (const auto & s : (*ne)->showings) { showings.push_back(s); if (SuggestWithFeedback(showings) & 0x1) { break; @@ -35,7 +35,7 @@ class TheBitDumbScheduler : public EpisodeGroup { else { EpisodesIter ne = e; ne++; - BOOST_FOREACH(const auto & s, (*e)->showings) { + for (const auto & s : (*e)->showings) { showings.push_back(s); SelectShowings(ne, complexityLevel); showings.pop_back(); diff --git a/p2pvr/daemon/schedules.cpp b/p2pvr/daemon/schedules.cpp index abb3b46..f70d44d 100644 --- a/p2pvr/daemon/schedules.cpp +++ b/p2pvr/daemon/schedules.cpp @@ -9,7 +9,7 @@ #include "p2Helpers.h" #include "containerIterator.h" #include "resources.h" -#include +#include #include ResourceString(Schedules_getCandidates, sql_Schedules_getCandidates); @@ -193,14 +193,14 @@ EpisodeGroup::IsShowingListValid(const Showings & showings) const Periods periods; Usage usage; - BOOST_FOREACH(const auto & s, showings) { + for (const auto & s : showings) { if (s) { periods.insert(Periods::value_type(s->startTime, {s->transportStreamId, 1})); periods.insert(Periods::value_type(s->stopTime, {s->transportStreamId, -1})); } } bool result = true; - BOOST_FOREACH(const auto & p, periods) { + for (const auto & p : periods) { auto & u = usage[p.second.trans]; u += p.second.offset; if (std::count_if(usage.begin(), usage.end(), [](const Usage::value_type & uv) { return uv.second > 0;}) > tuners) { @@ -292,9 +292,9 @@ Schedules::GetEpisodeIntersects(Episodes & all, Episodes & grouped) { for (Episodes::iterator aei = all.begin(); aei != all.end(); aei++) { const auto & ae = *aei; - BOOST_FOREACH(const auto & ge, grouped) { - BOOST_FOREACH(const auto & gs, ge->showings) { - BOOST_FOREACH(const auto & as, ae->showings) { + for (const auto & ge : grouped) { + for (const auto & gs : ge->showings) { + for (const auto & as : ae->showings) { if (gs->period.intersects(as->period)) { Logger()->messagebf(LOG_DEBUG, " added %s", ae->what); grouped.push_back(ae); @@ -324,7 +324,7 @@ Schedules::DoReschedule(const Ice::Current & ice) Showings allShowings; EpisodePtr cur; int minPriority = 0; - BOOST_FOREACH(const auto & c, episodes) { + for (const auto & c : episodes) { if (!cur || cur->what != c->What) { cur = new Episode(c->What); scheduleList.push_back(cur); @@ -336,9 +336,9 @@ Schedules::DoReschedule(const Ice::Current & ice) allShowings.push_back(s); } Logger()->messagebf(LOG_DEBUG, "%d episodes created, %s showings", scheduleList.size(), allShowings.size()); - BOOST_FOREACH(const auto & e, scheduleList) { + for (const auto & e : scheduleList) { Logger()->messagebf(LOG_DEBUG, " %s", e->what); - BOOST_FOREACH(const auto & s, e->showings) { + for (const auto & s : e->showings) { s->priority += 1 - minPriority; e->priority += s->priority; } @@ -363,7 +363,7 @@ Schedules::DoReschedule(const Ice::Current & ice) Logger()->messagebf(LOG_DEBUG, "group created with %d episodes", group.size()); double total = 1; // Measure and add the optional to not record - BOOST_FOREACH(const auto & e, group) { + for (const auto & e : group) { Logger()->messagebf(LOG_DEBUG, " %d * %d:%s", e->showings.size(), e->priority, e->what); e->showings.push_back(NULL); total *= e->showings.size(); @@ -373,13 +373,13 @@ Schedules::DoReschedule(const Ice::Current & ice) EpisodeGroupPtr sched = EpisodeGroupPtr(EpisodeGroupLoader::createNew(SchedulerAlgorithm, group)); sched->tuners = tunerCount; std::set selected; - BOOST_FOREACH(const auto & s, sched->Solve()) { + for (const auto & s : sched->Solve()) { if (s) selected.insert(s); } - BOOST_FOREACH(const auto & c, group) { + for (const auto & c : group) { Logger()->messagebf(LOG_DEBUG, "Episode %s, %d options", c->what, c->showings.size()); - BOOST_FOREACH(const auto & i, c->showings) { + for (const auto & i : c->showings) { if (selected.find(i) != selected.end()) { Logger()->messagebf(LOG_DEBUG, " %s - %s (%d) <-", i->startTime, i->stopTime, i->transportStreamId); } @@ -389,15 +389,15 @@ Schedules::DoReschedule(const Ice::Current & ice) } } Logger()->message(LOG_DEBUG, "----------"); - BOOST_FOREACH(const auto & c, group) { + for (const auto & c : group) { bool found = false; - BOOST_FOREACH(const auto & i, c->showings) { + for (const auto & i : c->showings) { if (i && selected.find(i) != selected.end()) { found = true; break; } } - BOOST_FOREACH(const auto & i, c->showings) { + for (const auto & i : c->showings) { if (i) { records.push_back(RecordPtr(new Record(i->eventUid, found ? diff --git a/p2pvr/daemon/si.cpp b/p2pvr/daemon/si.cpp index 0c5162e..ad33109 100644 --- a/p2pvr/daemon/si.cpp +++ b/p2pvr/daemon/si.cpp @@ -106,7 +106,7 @@ SI::GetEvents(const P2PVR::IntSequence & eventUids, const Ice::Current &) { P2PVR::Events rtn; SqlContainerCreator cc(rtn); - BOOST_FOREACH(const auto & uid, eventUids){ + for (const auto & uid : eventUids){ cc.populate(Select(SI_eventByUid, uid).second); } if (rtn.size() != eventUids.size()) throw P2PVR::NotFound(); diff --git a/p2pvr/daemon/unittests/testMaint.cpp b/p2pvr/daemon/unittests/testMaint.cpp index 10f365e..b064d5b 100644 --- a/p2pvr/daemon/unittests/testMaint.cpp +++ b/p2pvr/daemon/unittests/testMaint.cpp @@ -38,7 +38,7 @@ class Core { s = P2PVR::SIPrx::checkedCast(ic->stringToProxy("SI")); BOOST_REQUIRE(s); s->ice_ping(); - + m = P2PVR::MaintenancePrx::checkedCast(ic->stringToProxy("Maintenance")); BOOST_REQUIRE(m); m->ice_ping(); @@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE( update_events ) auto recs = r->GetRecordings(); BOOST_CHECKPOINT("Delete existing recordings"); - BOOST_FOREACH(const auto & rec, recs) { + for (const auto & rec : recs) { r->DeleteRecording(rec->RecordingId); } diff --git a/p2pvr/devices/localDevices.cpp b/p2pvr/devices/localDevices.cpp index 7a43a15..4f270dd 100644 --- a/p2pvr/devices/localDevices.cpp +++ b/p2pvr/devices/localDevices.cpp @@ -34,7 +34,7 @@ void LocalDevices::ClientCheck(Ice::ObjectAdapterPtr adapter) { std::lock_guard g(lock); - BOOST_FOREACH(auto & device, devices) { + for (auto & device : devices) { if (device.second && device.second->tuner->GetLastUsedTime() < time(NULL) - 30) { Logger()->messagebf(LOG_DEBUG, "%s: Device %s no longer in use", __PRETTY_FUNCTION__, device.first); auto id = device.second->tuner->ice_getIdentity(); diff --git a/p2pvr/devices/mockTuner.cpp b/p2pvr/devices/mockTuner.cpp index b89d533..c7c51a7 100644 --- a/p2pvr/devices/mockTuner.cpp +++ b/p2pvr/devices/mockTuner.cpp @@ -1,5 +1,4 @@ #include "mockTuner.h" -#include #include #include #include @@ -70,7 +69,7 @@ void MockTuner::DecompressAndSendPackets(const Ice::ByteSeq & dataxz, const P2PV istrm->read(packets); Logger()->messagebf(LOG_DEBUG, "%s: send", __PRETTY_FUNCTION__); - BOOST_FOREACH(const auto & packet, packets) { + for (const auto & packet : packets) { client->NewData(packet); } diff --git a/p2pvr/devices/pch.hpp b/p2pvr/devices/pch.hpp index 2eeeea5..435ce48 100644 --- a/p2pvr/devices/pch.hpp +++ b/p2pvr/devices/pch.hpp @@ -4,7 +4,6 @@ #include #include -#include #include #include #include diff --git a/p2pvr/devices/tuner.cpp b/p2pvr/devices/tuner.cpp index fe90231..ee1625a 100644 --- a/p2pvr/devices/tuner.cpp +++ b/p2pvr/devices/tuner.cpp @@ -322,7 +322,7 @@ Tuner::senderThread() int n = backgroundClients.rbegin()->first + 1; fd_set rfds; FD_ZERO(&rfds); - BOOST_FOREACH(const auto & c, backgroundClients) { + for (const auto & c : backgroundClients) { FD_SET(c.first, &rfds); } lock.unlock(); diff --git a/p2pvr/dvb/pch.hpp b/p2pvr/dvb/pch.hpp index c6319b8..7828bd2 100644 --- a/p2pvr/dvb/pch.hpp +++ b/p2pvr/dvb/pch.hpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/p2pvr/dvb/siParsers/event.cpp b/p2pvr/dvb/siParsers/event.cpp index c094331..4c3a572 100644 --- a/p2pvr/dvb/siParsers/event.cpp +++ b/p2pvr/dvb/siParsers/event.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include "event.h" diff --git a/p2pvr/lib/containerIterator.h b/p2pvr/lib/containerIterator.h index 2b61055..03af88c 100644 --- a/p2pvr/lib/containerIterator.h +++ b/p2pvr/lib/containerIterator.h @@ -2,7 +2,6 @@ #define CONTAINERITERATOR_H #include -#include #include "objectRowState.h" template @@ -19,7 +18,7 @@ class ContainerIterator : public IHaveSubTasks { void execute(ExecContext * ec) const { ObjectRowState rs; - BOOST_FOREACH(const auto & i, *container) { + for (const auto & i : *container) { binder(rs, i); rs.process(boost::bind(&ContainerIterator::executeChildren, this, ec)); } @@ -28,10 +27,10 @@ class ContainerIterator : public IHaveSubTasks { private: boost::function binder; const T * container; - + void executeChildren(ExecContext * ec) const { - BOOST_FOREACH(const Tasks::value_type & sq, normal) { + for (const Tasks::value_type & sq : normal) { sq->execute(ec); } } diff --git a/p2pvr/lib/mapIterator.h b/p2pvr/lib/mapIterator.h index 8a06fe6..70aa424 100644 --- a/p2pvr/lib/mapIterator.h +++ b/p2pvr/lib/mapIterator.h @@ -2,7 +2,6 @@ #define MAPITERATOR_H #include -#include #include "objectRowState.h" template @@ -21,7 +20,7 @@ class MapIterator : public IHaveSubTasks { void execute(ExecContext * ec) const { ObjectRowState rs(columnSpecifier); - BOOST_FOREACH(const auto & i, *map) { + for (const auto & i : *map) { binder(rs, i); rs.process(boost::bind(&MapIterator::executeChildren, this, ec)); } @@ -31,10 +30,10 @@ class MapIterator : public IHaveSubTasks { boost::function binder; const ColumnSpecifier columnSpecifier; const T * map; - + void executeChildren(ExecContext * ec) const { - BOOST_FOREACH(const Tasks::value_type & sq, normal) { + for (const Tasks::value_type & sq : normal) { sq->execute(ec); } } diff --git a/p2pvr/lib/muxer.cpp b/p2pvr/lib/muxer.cpp index 5c1beaa..15152a2 100644 --- a/p2pvr/lib/muxer.cpp +++ b/p2pvr/lib/muxer.cpp @@ -125,7 +125,7 @@ Muxer::ReadMuxerAndSend(int waitTime) const buf.resize(len); std::vector lines; boost::algorithm::split(lines, buf, boost::algorithm::is_any_of("\r\n\f"), boost::algorithm::token_compress_on); - BOOST_FOREACH(const auto & line, lines) { + for (const auto & line : lines) { if (line.empty()) continue; Logger()->messagebf(LOG_INFO, "Muxer::%p > %s", this, line); } diff --git a/p2pvr/lib/pch.hpp b/p2pvr/lib/pch.hpp index 36ccd9c..b9a507c 100644 --- a/p2pvr/lib/pch.hpp +++ b/p2pvr/lib/pch.hpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include #include diff --git a/p2pvr/lib/serviceStreamer.cpp b/p2pvr/lib/serviceStreamer.cpp index b9de8fd..99a204a 100644 --- a/p2pvr/lib/serviceStreamer.cpp +++ b/p2pvr/lib/serviceStreamer.cpp @@ -50,7 +50,7 @@ bool ServiceStreamer::HandlePMT(DVBSI::ProgramMapPtr pmp) { Streams strms; - BOOST_FOREACH(const auto & s, pmp->Streams) { + for (const auto & s : pmp->Streams) { if (s->Type >= 2 && s->Type <= 5) { strms.insert(s->Id); } diff --git a/p2pvr/lib/singleIterator.h b/p2pvr/lib/singleIterator.h index 1aac418..acbe50b 100644 --- a/p2pvr/lib/singleIterator.h +++ b/p2pvr/lib/singleIterator.h @@ -2,7 +2,6 @@ #define SINGLEITERATOR_H #include -#include #include "objectRowState.h" template @@ -26,10 +25,10 @@ class SingleIterator : public IHaveSubTasks { private: boost::function binder; const T * item; - + void executeChildren(ExecContext * ec) const { - BOOST_FOREACH(const Tasks::value_type & sq, normal) { + for (const Tasks::value_type & sq : normal) { sq->execute(ec); } } -- cgit v1.2.3