forked from qt-creator/qt-creator
Use bit vectors to store the preprocessor's state.
This commit is contained in:
@@ -545,6 +545,8 @@ Preprocessor::Preprocessor(Client *client, Environment *env)
|
||||
: client(client),
|
||||
env(env),
|
||||
_expand(env),
|
||||
_skipping(MAX_LEVEL),
|
||||
_true_test(MAX_LEVEL),
|
||||
_result(0),
|
||||
_markGeneratedTokens(false),
|
||||
_expandMacros(true)
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
#include <Token.h>
|
||||
#include <QVector>
|
||||
#include <QBitArray>
|
||||
|
||||
namespace CPlusPlus {
|
||||
|
||||
@@ -177,8 +178,8 @@ private:
|
||||
Environment *env;
|
||||
MacroExpander _expand;
|
||||
|
||||
bool _skipping[MAX_LEVEL]; // ### move in state
|
||||
bool _true_test[MAX_LEVEL]; // ### move in state
|
||||
QBitArray _skipping; // ### move in state
|
||||
QBitArray _true_test; // ### move in state
|
||||
int iflevel; // ### move in state
|
||||
|
||||
QList<State> _savedStates;
|
||||
|
||||
Reference in New Issue
Block a user