- updated also lexerScanner with the new assert

Fri, 02 May 2014 21:38:19 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Fri, 02 May 2014 21:38:19 +0300
changeset 126
c5858c0cd476
parent 125
85814c0918c5
child 127
ed4289183de6

- updated also lexerScanner with the new assert

src/lexerScanner.cpp file | annotate | diff | comparison | revisions
--- a/src/lexerScanner.cpp	Fri May 02 21:37:18 2014 +0300
+++ b/src/lexerScanner.cpp	Fri May 02 21:38:19 2014 +0300
@@ -28,7 +28,6 @@
 
 #include <cstdio>
 #include <cstdlib>
-#include <cassert>
 #include <cstring>
 #include <string>
 #include "lexerScanner.h"
@@ -128,7 +127,7 @@
 	m_data = new char[fsize];
 	m_position = m_lineBreakPosition = &m_data[0];
 	bytes = fread (m_data, 1, fsize, fp);
-	assert (bytes >= fsize);
+	ASSERT_GT_EQ (bytes, fsize)
 }
 
 // =============================================================================
@@ -291,7 +290,7 @@
 //
 String LexerScanner::getTokenString (ETokenType a)
 {
-	assert ((int) a <= gLastNamedToken);
+	ASSERT_LT_EQ (a, gLastNamedToken);
 	return gTokenStrings[a];
 }
 

mercurial