forked from qt-creator/qt-creator
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:
17
src/libs/3rdparty/cplusplus/TranslationUnit.h
vendored
17
src/libs/3rdparty/cplusplus/TranslationUnit.h
vendored
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user