assert ==> Q_ASSERT

This commit is contained in:
Jekyll Wu
2012-03-01 19:30:56 +08:00
parent 52707e0667
commit 26331fc17c
2 changed files with 7 additions and 9 deletions

View File

@@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
@@ -1157,7 +1156,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;
@@ -1178,9 +1177,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);
@@ -1190,7 +1189,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();