use QTC_ASSERT instead of Q_ASSERT

This commit is contained in:
hjk
2008-12-09 15:25:01 +01:00
parent e99d8ce3fc
commit 4a552ead9f
94 changed files with 923 additions and 673 deletions

View File

@@ -52,11 +52,14 @@
#include "pp-environment.h"
#include "pp.h"
#include <utils/qtcassert.h>
#include <cstring>
using namespace CPlusPlus;
Environment::Environment ()
Environment::Environment()
: currentLine(0),
hide_next(false),
_macros(0),
@@ -67,7 +70,7 @@ Environment::Environment ()
{
}
Environment::~Environment ()
Environment::~Environment()
{
if (_macros) {
qDeleteAll(firstMacro(), lastMacro());
@@ -78,15 +81,19 @@ Environment::~Environment ()
free(_hash);
}
unsigned Environment::macroCount () const
{ return _macro_count + 1; }
unsigned Environment::macroCount() const
{
return _macro_count + 1;
}
Macro *Environment::macroAt (unsigned index) const
{ return _macros[index]; }
Macro *Environment::macroAt(unsigned index) const
{
return _macros[index];
}
Macro *Environment::bind(const Macro &__macro)
{
Q_ASSERT(! __macro.name.isEmpty());
QTC_ASSERT(! __macro.name.isEmpty(), return 0);
Macro *m = new Macro (__macro);
m->hashcode = hash_code(m->name);