From: ghost Date: Mon, 27 Apr 2009 20:57:34 +0000 (+0200) Subject: replace more assertions to get proper log messages X-Git-Tag: 2.6.0~325 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/adef5abc91835e6c9e06b446c1bd3e3a42ec03bc?ds=inline replace more assertions to get proper log messages --- diff --git a/lib/base/smartptr.h b/lib/base/smartptr.h index 782ff48e..ac6b9eb0 100644 --- a/lib/base/smartptr.h +++ b/lib/base/smartptr.h @@ -56,7 +56,7 @@ public: #ifndef SWIG T* grabRef() { if (!ptr) return 0; ptr->AddRef(); return ptr; } - T* &ptrref() { assert(!ptr); return ptr; } + T* &ptrref() { ASSERT(!ptr); return ptr; } #endif T* operator->() const { ptrAssert(ptr); return ptr; } operator T*() const { return this->ptr; } @@ -135,7 +135,7 @@ public: #ifndef SWIG T* grabRef() { if (!ptr) return 0; ptr->AddRef(); ptr->AddUse(); return ptr; } - T* &ptrref() { assert(!ptr); return ptr; } + T* &ptrref() { ASSERT(!ptr); return ptr; } #endif T* operator->() const { ptrAssert(ptr); return ptr; } operator T*() const { return this->ptr; } diff --git a/lib/dvb/esection.h b/lib/dvb/esection.h index 5720d5de..2bb17a98 100644 --- a/lib/dvb/esection.h +++ b/lib/dvb/esection.h @@ -189,7 +189,7 @@ public: next=0; first=0; - assert(current->ready); + ASSERT(current->ready); /*emit*/ tableReady(0); diff --git a/lib/gdi/font.h b/lib/gdi/font.h index 41d51ddc..2643fda2 100644 --- a/lib/gdi/font.h +++ b/lib/gdi/font.h @@ -160,22 +160,22 @@ public: const eRect& getGlyphBBox(int num) const { - assert(num >= 0); - assert(num < (int)glyphs.size()); + ASSERT(num >= 0); + ASSERT(num < (int)glyphs.size()); return glyphs[num].bbox; } void setGlyphFlag(int g, int f) { - assert(g >= 0); - assert(g < (int)glyphs.size()); + ASSERT(g >= 0); + ASSERT(g < (int)glyphs.size()); glyphs[g].flags |= f; } void clearGlyphFlag(int g, int f) { - assert(g >= 0); - assert(g < (int)glyphs.size()); + ASSERT(g >= 0); + ASSERT(g < (int)glyphs.size()); glyphs[g].flags |= f; } };