Renamed private member tokenlists to mTokenLists
This commit is contained in:
parent
de0e22a1fb
commit
517d8f9684
|
@ -63,7 +63,7 @@ Preprocessor::Preprocessor(Settings& settings, ErrorLogger *errorLogger) : mSett
|
||||||
|
|
||||||
Preprocessor::~Preprocessor()
|
Preprocessor::~Preprocessor()
|
||||||
{
|
{
|
||||||
for (std::map<std::string, simplecpp::TokenList *>::iterator it = tokenlists.begin(); it != tokenlists.end(); ++it)
|
for (std::map<std::string, simplecpp::TokenList *>::iterator it = mTokenLists.begin(); it != mTokenLists.end(); ++it)
|
||||||
delete it->second;
|
delete it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ void Preprocessor::inlineSuppressions(const simplecpp::TokenList &tokens)
|
||||||
return;
|
return;
|
||||||
std::list<BadInlineSuppression> err;
|
std::list<BadInlineSuppression> err;
|
||||||
::inlineSuppressions(tokens, mSettings, &err);
|
::inlineSuppressions(tokens, mSettings, &err);
|
||||||
for (std::map<std::string,simplecpp::TokenList*>::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) {
|
for (std::map<std::string,simplecpp::TokenList*>::const_iterator it = mTokenLists.begin(); it != mTokenLists.end(); ++it) {
|
||||||
if (it->second)
|
if (it->second)
|
||||||
::inlineSuppressions(*it->second, mSettings, &err);
|
::inlineSuppressions(*it->second, mSettings, &err);
|
||||||
}
|
}
|
||||||
|
@ -137,9 +137,9 @@ void Preprocessor::setDirectives(const simplecpp::TokenList &tokens)
|
||||||
mDirectives.clear();
|
mDirectives.clear();
|
||||||
|
|
||||||
std::vector<const simplecpp::TokenList *> list;
|
std::vector<const simplecpp::TokenList *> list;
|
||||||
list.reserve(1U + tokenlists.size());
|
list.reserve(1U + mTokenLists.size());
|
||||||
list.push_back(&tokens);
|
list.push_back(&tokens);
|
||||||
for (std::map<std::string, simplecpp::TokenList *>::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) {
|
for (std::map<std::string, simplecpp::TokenList *>::const_iterator it = mTokenLists.begin(); it != mTokenLists.end(); ++it) {
|
||||||
list.push_back(it->second);
|
list.push_back(it->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ std::set<std::string> Preprocessor::getConfigs(const simplecpp::TokenList &token
|
||||||
|
|
||||||
::getConfigs(tokens, defined, mSettings.userDefines, mSettings.userUndefs, ret);
|
::getConfigs(tokens, defined, mSettings.userDefines, mSettings.userUndefs, ret);
|
||||||
|
|
||||||
for (std::map<std::string, simplecpp::TokenList*>::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) {
|
for (std::map<std::string, simplecpp::TokenList*>::const_iterator it = mTokenLists.begin(); it != mTokenLists.end(); ++it) {
|
||||||
if (!mSettings.configurationExcluded(it->first))
|
if (!mSettings.configurationExcluded(it->first))
|
||||||
::getConfigs(*(it->second), defined, mSettings.userDefines, mSettings.userUndefs, ret);
|
::getConfigs(*(it->second), defined, mSettings.userDefines, mSettings.userUndefs, ret);
|
||||||
}
|
}
|
||||||
|
@ -577,12 +577,12 @@ void Preprocessor::loadFiles(const simplecpp::TokenList &rawtokens, std::vector<
|
||||||
{
|
{
|
||||||
const simplecpp::DUI dui = createDUI(mSettings, emptyString, files[0]);
|
const simplecpp::DUI dui = createDUI(mSettings, emptyString, files[0]);
|
||||||
|
|
||||||
tokenlists = simplecpp::load(rawtokens, files, dui, nullptr);
|
mTokenLists = simplecpp::load(rawtokens, files, dui, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preprocessor::removeComments()
|
void Preprocessor::removeComments()
|
||||||
{
|
{
|
||||||
for (std::map<std::string, simplecpp::TokenList*>::iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) {
|
for (std::map<std::string, simplecpp::TokenList*>::iterator it = mTokenLists.begin(); it != mTokenLists.end(); ++it) {
|
||||||
if (it->second)
|
if (it->second)
|
||||||
it->second->removeComments();
|
it->second->removeComments();
|
||||||
}
|
}
|
||||||
|
@ -615,7 +615,7 @@ simplecpp::TokenList Preprocessor::preprocess(const simplecpp::TokenList &tokens
|
||||||
simplecpp::OutputList outputList;
|
simplecpp::OutputList outputList;
|
||||||
std::list<simplecpp::MacroUsage> macroUsage;
|
std::list<simplecpp::MacroUsage> macroUsage;
|
||||||
simplecpp::TokenList tokens2(files);
|
simplecpp::TokenList tokens2(files);
|
||||||
simplecpp::preprocess(tokens2, tokens1, files, tokenlists, dui, &outputList, ¯oUsage);
|
simplecpp::preprocess(tokens2, tokens1, files, mTokenLists, dui, &outputList, ¯oUsage);
|
||||||
|
|
||||||
const bool showerror = (!mSettings.userDefines.empty() && !mSettings.force);
|
const bool showerror = (!mSettings.userDefines.empty() && !mSettings.force);
|
||||||
reportOutput(outputList, showerror);
|
reportOutput(outputList, showerror);
|
||||||
|
@ -908,7 +908,7 @@ unsigned int Preprocessor::calculateChecksum(const simplecpp::TokenList &tokens1
|
||||||
if (!tok->comment)
|
if (!tok->comment)
|
||||||
ostr << tok->str();
|
ostr << tok->str();
|
||||||
}
|
}
|
||||||
for (std::map<std::string, simplecpp::TokenList *>::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) {
|
for (std::map<std::string, simplecpp::TokenList *>::const_iterator it = mTokenLists.begin(); it != mTokenLists.end(); ++it) {
|
||||||
for (const simplecpp::Token *tok = it->second->cfront(); tok; tok = tok->next) {
|
for (const simplecpp::Token *tok = it->second->cfront(); tok; tok = tok->next) {
|
||||||
if (!tok->comment)
|
if (!tok->comment)
|
||||||
ostr << tok->str();
|
ostr << tok->str();
|
||||||
|
@ -920,7 +920,7 @@ unsigned int Preprocessor::calculateChecksum(const simplecpp::TokenList &tokens1
|
||||||
void Preprocessor::simplifyPragmaAsm(simplecpp::TokenList *tokenList)
|
void Preprocessor::simplifyPragmaAsm(simplecpp::TokenList *tokenList)
|
||||||
{
|
{
|
||||||
Preprocessor::simplifyPragmaAsmPrivate(tokenList);
|
Preprocessor::simplifyPragmaAsmPrivate(tokenList);
|
||||||
for (std::map<std::string, simplecpp::TokenList *>::iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) {
|
for (std::map<std::string, simplecpp::TokenList *>::iterator it = mTokenLists.begin(); it != mTokenLists.end(); ++it) {
|
||||||
Preprocessor::simplifyPragmaAsmPrivate(it->second);
|
Preprocessor::simplifyPragmaAsmPrivate(it->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -212,7 +212,7 @@ private:
|
||||||
/** list of all directives met while preprocessing file */
|
/** list of all directives met while preprocessing file */
|
||||||
std::list<Directive> mDirectives;
|
std::list<Directive> mDirectives;
|
||||||
|
|
||||||
std::map<std::string, simplecpp::TokenList *> tokenlists;
|
std::map<std::string, simplecpp::TokenList *> mTokenLists;
|
||||||
|
|
||||||
/** filename for cpp/c file - useful when reporting errors */
|
/** filename for cpp/c file - useful when reporting errors */
|
||||||
std::string file0;
|
std::string file0;
|
||||||
|
|
Loading…
Reference in New Issue