aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2009-04-06 14:08:55 +0200
committerFelix Domke <tmbinc@elitedvb.net>2009-04-06 14:08:55 +0200
commit84007236ce796615a8e74432aad110164b23b8ec (patch)
tree5053dc936f63882afe3fec56342e9d5d1dc8fe76
parent3e45b153a93894c4c382d3ba5ded974c738e9589 (diff)
downloadenigma2-84007236ce796615a8e74432aad110164b23b8ec.tar.gz
enigma2-84007236ce796615a8e74432aad110164b23b8ec.zip
replace assert by ASSERT, so a proper log message is generated
-rw-r--r--lib/base/thread.cpp11
-rw-r--r--lib/dvb/db.cpp2
-rw-r--r--lib/dvb/dvb.cpp2
-rw-r--r--lib/dvb/scan.cpp4
-rw-r--r--lib/gdi/grc.cpp2
-rw-r--r--lib/gdi/region.cpp34
-rw-r--r--lib/gui/einputnumber.cpp2
-rw-r--r--lib/gui/einputstring.cpp2
-rw-r--r--lib/gui/elistbox.cpp2
-rw-r--r--lib/gui/ewidget.cpp10
-rw-r--r--lib/gui/ewidgetdesktop.cpp6
-rw-r--r--lib/nav/core.cpp6
-rw-r--r--lib/nav/pcore.cpp2
-rw-r--r--lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp4
-rw-r--r--lib/service/listboxservice.cpp2
-rw-r--r--lib/service/servicedvb.cpp4
-rw-r--r--lib/service/servicemp3.cpp4
-rw-r--r--lib/service/servicexine.cpp12
18 files changed, 55 insertions, 56 deletions
diff --git a/lib/base/thread.cpp b/lib/base/thread.cpp
index 9878856e..db6deb35 100644
--- a/lib/base/thread.cpp
+++ b/lib/base/thread.cpp
@@ -2,7 +2,6 @@
#include <stdio.h>
#include <unistd.h>
-#include <assert.h>
#include <lib/base/eerror.h>
void eThread::thread_completed(void *ptr)
@@ -14,7 +13,7 @@ void eThread::thread_completed(void *ptr)
if (!p->m_state.value())
{
p->m_state.up();
- assert(p->m_state.value() == 1);
+ ASSERT(p->m_state.value() == 1);
}
p->thread_finished();
@@ -43,8 +42,8 @@ int eThread::runAsync(int prio, int policy)
return -1;
eDebug("after: %d", m_state.value());
- assert(m_state.value() == 1); /* sync postconditions */
- assert(!m_alive);
+ ASSERT(m_state.value() == 1); /* sync postconditions */
+ ASSERT(!m_alive);
m_state.down();
m_alive = 1;
@@ -91,7 +90,7 @@ int eThread::sync(void)
int res;
m_state.down(); /* this might block */
res = m_alive;
- assert(m_state.value() == 0);
+ ASSERT(m_state.value() == 0);
m_state.up();
return res; /* 0: thread is guaranteed not to run. 1: state unknown. */
}
@@ -121,6 +120,6 @@ void eThread::kill(bool sendcancel)
void eThread::hasStarted()
{
- assert(!m_state.value());
+ ASSERT(!m_state.value());
m_state.up();
}
diff --git a/lib/dvb/db.cpp b/lib/dvb/db.cpp
index e4d9ad22..647afad4 100644
--- a/lib/dvb/db.cpp
+++ b/lib/dvb/db.cpp
@@ -1374,7 +1374,7 @@ RESULT eDVBDB::addChannelToList(const eDVBChannelID &id, iDVBFrontendParameters
{
channel ch;
std::map<eDVBChannelID, channel>::iterator it = m_channels.find(id);
- assert(feparm);
+ ASSERT(feparm);
ch.m_frontendParameters = feparm;
if (it != m_channels.end())
it->second = ch;
diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp
index f0186de7..208f51d4 100644
--- a/lib/dvb/dvb.cpp
+++ b/lib/dvb/dvb.cpp
@@ -1828,7 +1828,7 @@ void eCueSheet::clear()
void eCueSheet::addSourceSpan(const pts_t &begin, const pts_t &end)
{
- assert(begin < end);
+ ASSERT(begin < end);
m_lock.WrLock();
m_spans.push_back(std::pair<pts_t, pts_t>(begin, end));
m_lock.Unlock();
diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp
index 379ab8e9..04c78c61 100644
--- a/lib/dvb/scan.cpp
+++ b/lib/dvb/scan.cpp
@@ -137,7 +137,7 @@ RESULT eDVBScan::nextChannel()
RESULT eDVBScan::startFilter()
{
bool startSDT=true;
- assert(m_demux);
+ ASSERT(m_demux);
/* only start required filters filter */
@@ -163,7 +163,7 @@ RESULT eDVBScan::startFilter()
{
std::vector<ProgramAssociationSection*>::const_iterator i =
m_PAT->getSections().begin();
- assert(i != m_PAT->getSections().end());
+ ASSERT(i != m_PAT->getSections().end());
tsid = (*i)->getTableIdExtension(); // in PAT this is the transport stream id
m_pat_tsid = eTransportStreamID(tsid);
for (; i != m_PAT->getSections().end(); ++i)
diff --git a/lib/gdi/grc.cpp b/lib/gdi/grc.cpp
index c8af2457..86d53fd3 100644
--- a/lib/gdi/grc.cpp
+++ b/lib/gdi/grc.cpp
@@ -609,7 +609,7 @@ void gDC::exec(gOpcode *o)
{
ePtr<eTextPara> para = new eTextPara(o->parm.renderText->area);
int flags = o->parm.renderText->flags;
- assert(m_current_font);
+ ASSERT(m_current_font);
para->setFont(m_current_font);
para->renderString(o->parm.renderText->text, (flags & gPainter::RT_WRAP) ? RS_WRAP : 0);
if (o->parm.renderText->text)
diff --git a/lib/gdi/region.cpp b/lib/gdi/region.cpp
index d75221fe..bbad3aa0 100644
--- a/lib/gdi/region.cpp
+++ b/lib/gdi/region.cpp
@@ -42,7 +42,7 @@ int gRegion::do_coalesce(int prevStart, unsigned int curStart)
{
// Figure out how many rectangles are in the band.
unsigned int numRects = curStart - prevStart;
- assert(numRects == rects.size() - curStart);
+ ASSERT(numRects == rects.size() - curStart);
if (!numRects)
return curStart;
std::vector<eRect>::iterator prevBox = rects.begin() + prevStart;
@@ -84,11 +84,11 @@ void gRegion::appendNonO(std::vector<eRect>::const_iterator r,
std::vector<eRect>::const_iterator rEnd, int y1, int y2)
{
int newRects = rEnd - r;
- assert(y1 < y2);
- assert(newRects != 0);
+ ASSERT(y1 < y2);
+ ASSERT(newRects != 0);
rects.reserve(rects.size() + newRects);
do {
- assert(r->x1 < r->x2);
+ ASSERT(r->x1 < r->x2);
rects.push_back(eRect(r->x1, y1, r->x2 - r->x1, y2 - y1));
r++;
} while (r != rEnd);
@@ -104,8 +104,8 @@ void gRegion::intersectO(
{
int x1, x2;
- assert(y1 < y2);
- assert(r1 != r1End && r2 != r2End);
+ ASSERT(y1 < y2);
+ ASSERT(r1 != r1End && r2 != r2End);
do {
x1 = max(r1->x1, r2->x1);
@@ -131,8 +131,8 @@ void gRegion::subtractO(
int x1;
x1 = r1->x1;
- assert(y1<y2);
- assert(r1 != r1End && r2 != r2End);
+ ASSERT(y1<y2);
+ ASSERT(r1 != r1End && r2 != r2End);
do {
if (r2->x2 <= x1)
@@ -146,7 +146,7 @@ void gRegion::subtractO(
} else
++r2;
} else if (r2->x1 < r1->x2) {
- assert(x1<r2->x1);
+ ASSERT(x1<r2->x1);
rects.push_back(eRect(x1, y1, r2->x1 - x1, y2 - y1));
x1 = r2->x2;
if (x1 >= r1->x2) {
@@ -166,7 +166,7 @@ void gRegion::subtractO(
} while ((r1 != r1End) && (r2 != r2End));
while (r1 != r1End)
{
- assert(x1<r1->x2);
+ ASSERT(x1<r1->x2);
rects.push_back(eRect(x1, y1, r1->x2 - x1, y2 - y1));
++r1;
if (r1 != r1End)
@@ -199,8 +199,8 @@ void gRegion::mergeO(
{
int x1, x2;
- assert(y1 < y2);
- assert(r1 != r1End && r2 != r2End);
+ ASSERT(y1 < y2);
+ ASSERT(r1 != r1End && r2 != r2End);
if (r1->x1 < r2->x1)
{
@@ -244,8 +244,8 @@ void gRegion::regionOp(const gRegion &reg1, const gRegion &reg2, int opcode, int
int newSize = reg1.rects.size();
int numRects = reg2.rects.size();
- assert(r1 != r1End);
- assert(r2 != r2End);
+ ASSERT(r1 != r1End);
+ ASSERT(r2 != r2End);
if (numRects > newSize)
newSize = numRects;
@@ -256,8 +256,8 @@ void gRegion::regionOp(const gRegion &reg1, const gRegion &reg2, int opcode, int
int ybot = min(r1->y1, r2->y1);
prevBand = 0;
do {
- assert(r1 != r1End);
- assert(r2 != r2End);
+ ASSERT(r1 != r1End);
+ ASSERT(r2 != r2End);
FindBand(r1, r1BandEnd, r1End, r1y1);
FindBand(r2, r2BandEnd, r2End, r2y1);
if (r1y1 < r2y1) {
@@ -299,7 +299,7 @@ void gRegion::regionOp(const gRegion &reg1, const gRegion &reg2, int opcode, int
mergeO(r1, r1BandEnd, r2, r2BandEnd, ytop, ybot, overlap);
break;
default:
- assert(0);
+ ASSERT(0);
break;
}
coalesce(prevBand, curBand);
diff --git a/lib/gui/einputnumber.cpp b/lib/gui/einputnumber.cpp
index 29c78801..a71e161f 100644
--- a/lib/gui/einputnumber.cpp
+++ b/lib/gui/einputnumber.cpp
@@ -105,7 +105,7 @@ int eInputContentNumber::haveKey(int code, int overwrite)
m_cursor++;
- assert(m_cursor <= m_len);
+ ASSERT(m_cursor <= m_len);
if (m_input)
m_input->invalidate();
diff --git a/lib/gui/einputstring.cpp b/lib/gui/einputstring.cpp
index 9ead4fa9..4562e633 100644
--- a/lib/gui/einputstring.cpp
+++ b/lib/gui/einputstring.cpp
@@ -65,7 +65,7 @@ int eInputContentString::haveKey(int code, int overwrite)
m_cursor++;
- assert(m_cursor <= m_len);
+ ASSERT(m_cursor <= m_len);
if (m_input)
m_input->invalidate();
diff --git a/lib/gui/elistbox.cpp b/lib/gui/elistbox.cpp
index e8a0dada..c13114e8 100644
--- a/lib/gui/elistbox.cpp
+++ b/lib/gui/elistbox.cpp
@@ -302,7 +302,7 @@ int eListbox::event(int event, void *data, void *data2)
if (!m_content)
return eWidget::event(event, data, data2);
- assert(m_content);
+ ASSERT(m_content);
getStyle(style);
diff --git a/lib/gui/ewidget.cpp b/lib/gui/ewidget.cpp
index a302cbc6..2320cd46 100644
--- a/lib/gui/ewidget.cpp
+++ b/lib/gui/ewidget.cpp
@@ -88,7 +88,7 @@ void eWidget::invalidate(const gRegion &region)
while (root && !root->m_desktop)
{
root = root->m_parent;
- assert(root);
+ ASSERT(root);
if (root->m_layer != -1)
target_layer = root->m_layer;
abspos += root->position();
@@ -122,7 +122,7 @@ void eWidget::show()
probably somebody already erased the root, but tries some
operations on a child window.
ignore them for now. */
- /* assert(root); */
+ /* ASSERT(root); */
return;
}
if (root->m_layer != -1)
@@ -162,7 +162,7 @@ void eWidget::hide()
return;
abspos += root->position();
}
- assert(root->m_desktop);
+ ASSERT(root->m_desktop);
gRegion abs = m_visible_with_childs;
abs.moveBy(abspos);
@@ -218,7 +218,7 @@ ePoint eWidget::getAbsolutePosition()
while (root && !root->m_desktop)
{
root = root->m_parent;
- assert(root);
+ ASSERT(root);
abspos += root->position();
}
@@ -303,7 +303,7 @@ void eWidget::recalcClipRegionsWhenVisible()
break;
}
t = t->m_parent;
- assert(t);
+ ASSERT(t);
} while(1);
}
diff --git a/lib/gui/ewidgetdesktop.cpp b/lib/gui/ewidgetdesktop.cpp
index 63aeaace..05b4ec4d 100644
--- a/lib/gui/ewidgetdesktop.cpp
+++ b/lib/gui/ewidgetdesktop.cpp
@@ -7,7 +7,7 @@ extern void dumpRegion(const gRegion &region);
void eWidgetDesktop::addRootWidget(eWidget *root)
{
- assert(!root->m_desktop);
+ ASSERT(!root->m_desktop);
int invert_sense = 0;
/* buffered mode paints back-to-front, while immediate mode is front-to-back. */
@@ -374,7 +374,7 @@ void eWidgetDesktop::makeCompatiblePixmap(gPixmap &pm)
ePtr<gPixmap> target_pixmap;
m_screen.m_dc->getPixmap(target_pixmap);
- assert(target_pixmap);
+ ASSERT(target_pixmap);
if (target_pixmap->surface && target_pixmap->surface->bpp > 8)
return;
@@ -462,7 +462,7 @@ void eWidgetDesktop::redrawComposition(int notified)
if (m_comp_mode != cmBuffered)
return;
- assert(m_screen.m_dc);
+ ASSERT(m_screen.m_dc);
gPainter p(m_screen.m_dc);
p.resetClip(eRect(ePoint(0, 0), m_screen.m_screen_size));
diff --git a/lib/nav/core.cpp b/lib/nav/core.cpp
index 90650f68..ad777660 100644
--- a/lib/nav/core.cpp
+++ b/lib/nav/core.cpp
@@ -26,7 +26,7 @@ RESULT eNavigation::playService(const eServiceReference &service)
{
stopService();
- assert(m_servicehandler);
+ ASSERT(m_servicehandler);
RESULT res = m_servicehandler->play(service, m_runningService);
if (m_runningService)
{
@@ -74,7 +74,7 @@ RESULT eNavigation::stopService(void)
RESULT eNavigation::recordService(const eServiceReference &ref, ePtr<iRecordableService> &service, bool simulate)
{
- assert(m_servicehandler);
+ ASSERT(m_servicehandler);
RESULT res = m_servicehandler->record(ref, service);
eDebug("record: %d", res);
if (res)
@@ -148,7 +148,7 @@ RESULT eNavigation::pause(int dop)
eNavigation::eNavigation(iServiceHandler *serviceHandler)
{
- assert(serviceHandler);
+ ASSERT(serviceHandler);
m_servicehandler = serviceHandler;
}
diff --git a/lib/nav/pcore.cpp b/lib/nav/pcore.cpp
index b38e5597..264817ce 100644
--- a/lib/nav/pcore.cpp
+++ b/lib/nav/pcore.cpp
@@ -10,7 +10,7 @@ pNavigation::pNavigation()
ePtr<iServiceHandler> service_center;
eServiceCenter::getInstance(service_center);
- assert(service_center);
+ ASSERT(service_center);
m_core = new eNavigation(service_center);
m_core->connectEvent(slot(*this, &pNavigation::navEvent), m_nav_event_connection);
diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
index e35f2807..2b3eab0b 100644
--- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
+++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
@@ -302,7 +302,7 @@ RESULT eServiceDVD::connectEvent(const Slot2<void,iPlayableService*,int> &event,
RESULT eServiceDVD::start()
{
- assert(m_state == stIdle);
+ ASSERT(m_state == stIdle);
m_state = stRunning;
eDebug("eServiceDVD starting");
// m_event(this, evStart);
@@ -311,7 +311,7 @@ RESULT eServiceDVD::start()
RESULT eServiceDVD::stop()
{
- assert(m_state != stIdle);
+ ASSERT(m_state != stIdle);
if (m_state == stStopped)
return -1;
eDebug("DVD: stop %s", m_filename.c_str());
diff --git a/lib/service/listboxservice.cpp b/lib/service/listboxservice.cpp
index 6cd7c625..a2c6b8fe 100644
--- a/lib/service/listboxservice.cpp
+++ b/lib/service/listboxservice.cpp
@@ -67,7 +67,7 @@ void eListboxServiceContent::setRoot(const eServiceReference &root, bool justSet
m_lst=0;
return;
}
- assert(m_service_center);
+ ASSERT(m_service_center);
if (m_service_center->list(m_root, m_lst))
eDebug("no list available!");
diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp
index b92965da..4b762b99 100644
--- a/lib/service/servicedvb.cpp
+++ b/lib/service/servicedvb.cpp
@@ -1133,7 +1133,7 @@ RESULT eDVBServicePlay::pause(ePtr<iPauseableService> &ptr)
RESULT eDVBServicePlay::setSlowMotion(int ratio)
{
- assert(ratio); /* The API changed: instead of calling setSlowMotion(0), call play! */
+ ASSERT(ratio); /* The API changed: instead of calling setSlowMotion(0), call play! */
eDebug("eDVBServicePlay::setSlowMotion(%d)", ratio);
setFastForward_internal(0);
if (m_decoder)
@@ -1145,7 +1145,7 @@ RESULT eDVBServicePlay::setSlowMotion(int ratio)
RESULT eDVBServicePlay::setFastForward(int ratio)
{
eDebug("eDVBServicePlay::setFastForward(%d)", ratio);
- assert(ratio);
+ ASSERT(ratio);
return setFastForward_internal(ratio);
}
diff --git a/lib/service/servicemp3.cpp b/lib/service/servicemp3.cpp
index b1764eb4..006c6e94 100644
--- a/lib/service/servicemp3.cpp
+++ b/lib/service/servicemp3.cpp
@@ -621,7 +621,7 @@ RESULT eServiceMP3::connectEvent(const Slot2<void,iPlayableService*,int> &event,
RESULT eServiceMP3::start()
{
- assert(m_state == stIdle);
+ ASSERT(m_state == stIdle);
m_state = stRunning;
if (m_gst_pipeline)
@@ -635,7 +635,7 @@ RESULT eServiceMP3::start()
RESULT eServiceMP3::stop()
{
- assert(m_state != stIdle);
+ ASSERT(m_state != stIdle);
if (m_state == stStopped)
return -1;
eDebug("MP3: %s stop\n", m_filename.c_str());
diff --git a/lib/service/servicexine.cpp b/lib/service/servicexine.cpp
index 47be4d42..44e6a6e0 100644
--- a/lib/service/servicexine.cpp
+++ b/lib/service/servicexine.cpp
@@ -175,8 +175,8 @@ RESULT eServiceXine::start()
if (m_state == stError)
return -1;
- assert(m_state == stIdle);
- assert(stream);
+ ASSERT(m_state == stIdle);
+ ASSERT(stream);
if (!xine_open(stream, m_filename.c_str()))
{
@@ -201,8 +201,8 @@ RESULT eServiceXine::stop()
if (m_state == stError)
return -1;
- assert(m_state != stIdle);
- assert(stream);
+ ASSERT(m_state != stIdle);
+ ASSERT(stream);
if (m_state == stStopped)
return -1;
printf("Xine: %s stop\n", m_filename.c_str());
@@ -259,7 +259,7 @@ RESULT eServiceXine::getLength(pts_t &pts)
pts = -1;
if (m_state == stError)
return 1;
- assert(stream);
+ ASSERT(stream);
int pos_stream, pos_time, length_time;
@@ -293,7 +293,7 @@ RESULT eServiceXine::getPlayPosition(pts_t &pts)
pts = -1;
if (m_state == stError)
return 1;
- assert(stream);
+ ASSERT(stream);
int pos_stream, pos_time, length_time;