diff --git a/lib/BlockArray.cpp b/lib/BlockArray.cpp index 3f36390..e4ccf8d 100644 --- a/lib/BlockArray.cpp +++ b/lib/BlockArray.cpp @@ -27,7 +27,6 @@ #include "BlockArray.h" // System -#include #include #include #include @@ -57,7 +56,7 @@ BlockArray::BlockArray() BlockArray::~BlockArray() { setHistorySize(0); - assert(!lastblock); + Q_ASSERT(!lastblock); } size_t BlockArray::append(Block * block) @@ -149,7 +148,7 @@ const Block * BlockArray::at(size_t i) size_t j = i; // (current - (index - i) + (index/size+1)*size) % size ; - assert(j < size); + Q_ASSERT(j < size); unmap(); Block * block = (Block *)mmap(0, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize); @@ -218,7 +217,7 @@ bool BlockArray::setHistorySize(size_t newsize) return false; } - assert(!lastblock); + Q_ASSERT(!lastblock); lastblock = new Block(); size = newsize; diff --git a/lib/Emulation.cpp b/lib/Emulation.cpp index cbfdbf8..4a15a4b 100644 --- a/lib/Emulation.cpp +++ b/lib/Emulation.cpp @@ -23,7 +23,6 @@ #include "Emulation.h" // System -#include #include #include #include diff --git a/lib/History.cpp b/lib/History.cpp index 476d616..cccf211 100644 --- a/lib/History.cpp +++ b/lib/History.cpp @@ -24,7 +24,6 @@ // System #include #include -#include #include #include #include @@ -110,7 +109,7 @@ HistoryFile::~HistoryFile() //to avoid this. void HistoryFile::map() { - assert( fileMap == 0 ); + Q_ASSERT( fileMap == 0 ); fileMap = (char*)mmap( 0 , length , PROT_READ , MAP_PRIVATE , ion , 0 ); @@ -126,7 +125,7 @@ void HistoryFile::map() void HistoryFile::unmap() { int result = munmap( fileMap , length ); - assert( result == 0 ); Q_UNUSED( result ); + Q_ASSERT( result == 0 ); Q_UNUSED( result ); fileMap = 0; } @@ -502,7 +501,7 @@ void HistoryScrollBlockArray::getCells(int lineno, int colno, return; } - assert(((colno + count) * sizeof(Character)) < ENTRIES); + Q_ASSERT(((colno + count) * sizeof(Character)) < ENTRIES); memcpy(res, b->data + (colno * sizeof(Character)), count * sizeof(Character)); } @@ -513,7 +512,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count) if (!b) return; // put cells in block's data - assert((count * sizeof(Character)) < ENTRIES); + Q_ASSERT((count * sizeof(Character)) < ENTRIES); memset(b->data, 0, ENTRIES); @@ -521,7 +520,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count) b->size = count * sizeof(Character); size_t res = m_blockArray.newBlock(); - assert (res > 0); + Q_ASSERT(res > 0); Q_UNUSED( res ); m_lineLengths.insert(m_blockArray.getCurrent(), count); diff --git a/lib/Screen.cpp b/lib/Screen.cpp index 9ba0768..fa03652 100644 --- a/lib/Screen.cpp +++ b/lib/Screen.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -1177,7 +1176,7 @@ int Screen::copyLineToStream(int line , static const int MAX_CHARS = 1024; static Character characterBuffer[MAX_CHARS]; - assert( count < MAX_CHARS ); + Q_ASSERT( count < MAX_CHARS ); LineProperty currentLineProperties = 0; @@ -1202,9 +1201,9 @@ int Screen::copyLineToStream(int line , } // safety checks - assert( start >= 0 ); - assert( count >= 0 ); - assert( (start+count) <= history->getLineLen(line) ); + Q_ASSERT( start >= 0 ); + Q_ASSERT( count >= 0 ); + Q_ASSERT( (start+count) <= history->getLineLen(line) ); history->getCells(line,start,count,characterBuffer); @@ -1216,7 +1215,7 @@ int Screen::copyLineToStream(int line , if ( count == -1 ) count = columns - start; - assert( count >= 0 ); + Q_ASSERT( count >= 0 ); const int screenLine = line-history->getLines(); diff --git a/lib/Session.cpp b/lib/Session.cpp index f25d3d6..813fe77 100644 --- a/lib/Session.cpp +++ b/lib/Session.cpp @@ -26,7 +26,6 @@ #include "Session.h" // Standard -#include #include // Qt diff --git a/lib/Vt102Emulation.cpp b/lib/Vt102Emulation.cpp index 38c6bfd..e548794 100644 --- a/lib/Vt102Emulation.cpp +++ b/lib/Vt102Emulation.cpp @@ -40,7 +40,6 @@ // Standard #include #include -#include // Qt #include