From 489d88a9a23cbb35d7e2322a1a091c5e0e524a20 Mon Sep 17 00:00:00 2001 From: satbaby Date: Wed, 9 May 2012 17:33:34 +0200 Subject: [PATCH] initialize volues --- lib/libeventserver/eventserver.cpp | 2 +- lib/libeventserver/eventserver.h | 2 +- src/eitd/SIevents.cpp | 1 + src/eitd/sectionsd.cpp | 8 ++++---- src/gui/bedit/bouqueteditor_bouquets.cpp | 8 ++++++++ src/gui/bedit/bouqueteditor_channels.cpp | 10 ++++++++++ src/gui/bedit/bouqueteditor_channels.h | 1 - src/gui/bedit/bouqueteditor_chanselect.cpp | 2 +- src/gui/infoviewer.cpp | 2 +- 9 files changed, 27 insertions(+), 9 deletions(-) diff --git a/lib/libeventserver/eventserver.cpp b/lib/libeventserver/eventserver.cpp index 266fcbf14..e34c9f52f 100644 --- a/lib/libeventserver/eventserver.cpp +++ b/lib/libeventserver/eventserver.cpp @@ -31,7 +31,7 @@ #include "eventserver.h" -void CEventServer::registerEvent2(const unsigned int eventID, const unsigned int ClientID, const std::string udsName) +void CEventServer::registerEvent2(const unsigned int eventID, const unsigned int ClientID, const std::string &udsName) { strcpy(eventData[eventID][ClientID].udsName, udsName.c_str()); } diff --git a/lib/libeventserver/eventserver.h b/lib/libeventserver/eventserver.h index f68233fe9..16a581ca2 100644 --- a/lib/libeventserver/eventserver.h +++ b/lib/libeventserver/eventserver.h @@ -68,7 +68,7 @@ class CEventServer unsigned int dataSize; }; - void registerEvent2(const unsigned int eventID, const unsigned int ClientID, const std::string udsName); + void registerEvent2(const unsigned int eventID, const unsigned int ClientID, const std::string &udsName); void registerEvent(const int fd); void unRegisterEvent2(const unsigned int eventID, const unsigned int ClientID); void unRegisterEvent(const int fd); diff --git a/src/eitd/SIevents.cpp b/src/eitd/SIevents.cpp index 195997d43..8205686cc 100644 --- a/src/eitd/SIevents.cpp +++ b/src/eitd/SIevents.cpp @@ -52,6 +52,7 @@ SIevent::SIevent(const t_original_network_id _original_network_id, const t_trans eventID = _event_id; table_id = 0xFF; /* not set */ version = 0xFF; + running = 0; } void SIevent::parse(Event &event) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index ff6c230f2..3e8246fa3 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -493,7 +493,7 @@ xprintf("addEvent: current %016llx event %016llx running %d messaging_got_CN %d\ { // ist ein MetaEvent, d.h. mit Zeiten fuer NVOD-Event - if (e->times.size()) + if (!e->times.empty()) { // D.h. wir fuegen die Zeiten in das richtige Event ein MySIeventsOrderUniqueKey::iterator ie = mySIeventsOrderUniqueKey.find(i->second); @@ -527,7 +527,7 @@ xprintf("addEvent: current %016llx event %016llx running %d messaging_got_CN %d\ // normales Event mySIeventsOrderUniqueKey.insert(std::make_pair(e->uniqueKey(), e)); - if (e->times.size()) + if (!e->times.empty()) { // diese beiden Mengen enthalten nur Events mit Zeiten mySIeventsOrderServiceUniqueKeyFirstStartTimeEventUniqueKey.insert(e); @@ -588,7 +588,7 @@ static void addNVODevent(const SIevent &evt) mySIeventsNVODorderUniqueKey.insert(std::make_pair(e->uniqueKey(), e)); unlockEvents(); - if (e->times.size()) + if (!e->times.empty()) { // diese beiden Mengen enthalten nur Events mit Zeiten writeLockEvents(); @@ -1472,7 +1472,7 @@ void CSectionThread::run() { xprintf("%s::run:: starting, pid %d (%lu)\n", name.c_str(), getpid(), pthread_self()); if (sections_debug) - dump_sched_info(name.c_str()); + dump_sched_info(name); addFilters(); diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 25026e181..c86ca75c6 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -55,6 +55,14 @@ CBEBouquetWidget::CBEBouquetWidget() int icol_w, icol_h; frameBuffer = CFrameBuffer::getInstance(); iconoffset = 0; + origPosition = 0; + newPosition = 0; + listmaxshow = 0; + bouquetsChanged = 0; + width = 0; + height = 0; + x = 0; + y = 0; ButtonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+8; diff --git a/src/gui/bedit/bouqueteditor_channels.cpp b/src/gui/bedit/bouqueteditor_channels.cpp index 2a3d44938..b90caddf6 100644 --- a/src/gui/bedit/bouqueteditor_channels.cpp +++ b/src/gui/bedit/bouqueteditor_channels.cpp @@ -60,6 +60,16 @@ CBEChannelWidget::CBEChannelWidget(const std::string & Caption, unsigned int Bou frameBuffer = CFrameBuffer::getInstance(); selected = 0; iconoffset = 0; + origPosition = 0; + newPosition = 0; + listmaxshow = 0; + numwidth = 0; + info_height = 0; + channelsChanged = false; + width = 0; + height = 0; + x = 0; + y = 0; theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); diff --git a/src/gui/bedit/bouqueteditor_channels.h b/src/gui/bedit/bouqueteditor_channels.h index a826fb324..b0fc31363 100644 --- a/src/gui/bedit/bouqueteditor_channels.h +++ b/src/gui/bedit/bouqueteditor_channels.h @@ -69,7 +69,6 @@ class CBEChannelWidget : public CMenuWidget int footerHeight; int info_height; - int ButtonHeight; std::string caption; bool channelsChanged; diff --git a/src/gui/bedit/bouqueteditor_chanselect.cpp b/src/gui/bedit/bouqueteditor_chanselect.cpp index 5b17ef189..ad0604abd 100644 --- a/src/gui/bedit/bouqueteditor_chanselect.cpp +++ b/src/gui/bedit/bouqueteditor_chanselect.cpp @@ -57,7 +57,7 @@ CBEChannelSelectWidget::CBEChannelSelectWidget(const std::string & Caption, unsi bouquet = Bouquet; mode = Mode; iconoffset = 0; - + info_height = 0; theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight(); fheight = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getHeight(); footerHeight= g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6; diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index da4168a6a..de264832b 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -2263,7 +2263,7 @@ void CInfoViewer::paint_ca_icons(int caid, char * icon, int &icon_space_offset) icon_map[0x0D00] = std::make_pair(index++,"cw"); icon_map[0x0900] = std::make_pair(index ,"nds"); - for (it=icon_map.begin(); it!=icon_map.end(); it++) { + for (it=icon_map.begin(); it!=icon_map.end(); ++it) { snprintf(buf, sizeof(buf), "%s_%s", (*it).second.second, icon); frameBuffer->getIconSize(buf, &icon_sizeW[(*it).second.first], &icon_sizeH); }