C++: Inline {TranslationUnit,Parser}::blockErrors

As indicated by profiling.

Change-Id: I04d741dcc6200eb351d7aec316572e0e94ef5bec
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
hjk
2013-04-16 15:38:59 +02:00
committed by Erik Verbruggen
parent b85eddb2ea
commit f0f406bacb
4 changed files with 10 additions and 19 deletions

View File

@@ -52,12 +52,9 @@ public:
void setSource(const char *source, unsigned size);
unsigned tokenCount() const
{ return _tokens->size(); }
const Token &tokenAt(unsigned index) const
{ return _tokens->at(index); }
int tokenKind(unsigned index) const
{ return _tokens->at(index).f.kind; }
unsigned tokenCount() const { return _tokens->size(); }
const Token &tokenAt(unsigned index) const { return _tokens->at(index); }
int tokenKind(unsigned index) const { return _tokens->at(index).f.kind; }
const char *spell(unsigned index) const;
unsigned commentCount() const;
@@ -72,8 +69,12 @@ public:
MemoryPool *memoryPool() const;
AST *ast() const;
bool blockErrors() const { return f._blockErrors; }
bool blockErrors(bool block);
bool blockErrors(bool block)
{
const bool previous = f._blockErrors;
f._blockErrors = block;
return previous;
}
bool qtMocRunEnabled() const;
void setQtMocRunEnabled(bool onoff);