From 807fbfd3181ab215f5c7f0c3dbc1595a2c0341b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 16 Jun 2018 16:28:03 +0200 Subject: [PATCH] Renamed _isC and _isCPP --- lib/tokenlist.cpp | 24 ++++++++++++------------ lib/tokenlist.h | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/tokenlist.cpp b/lib/tokenlist.cpp index 98616ec48..dbffcffd5 100644 --- a/lib/tokenlist.cpp +++ b/lib/tokenlist.cpp @@ -40,8 +40,8 @@ static const unsigned int AST_MAX_DEPTH = 50U; TokenList::TokenList(const Settings* settings) : mTokensFrontBack(), mSettings(settings), - _isC(false), - _isCPP(false) + mIsC(false), + mIsCpp(false) { } @@ -81,14 +81,14 @@ unsigned int TokenList::appendFileIfNew(const std::string &fileName) // The "mFiles" vector remembers what files have been tokenized.. mFiles.push_back(Path::simplifyPath(fileName)); - // Update _isC and _isCPP properties + // Update mIsC and mIsCpp properties if (mFiles.size() == 1) { // Update only useful if first file added to _files if (!mSettings) { - _isC = Path::isC(getSourceFilePath()); - _isCPP = Path::isCPP(getSourceFilePath()); + mIsC = Path::isC(getSourceFilePath()); + mIsCpp = Path::isCPP(getSourceFilePath()); } else { - _isC = mSettings->enforcedLang == Settings::C || (mSettings->enforcedLang == Settings::None && Path::isC(getSourceFilePath())); - _isCPP = mSettings->enforcedLang == Settings::CPP || (mSettings->enforcedLang == Settings::None && Path::isCPP(getSourceFilePath())); + mIsC = mSettings->enforcedLang == Settings::C || (mSettings->enforcedLang == Settings::None && Path::isC(getSourceFilePath())); + mIsCpp = mSettings->enforcedLang == Settings::CPP || (mSettings->enforcedLang == Settings::None && Path::isCPP(getSourceFilePath())); } } return mFiles.size() - 1U; @@ -270,14 +270,14 @@ void TokenList::createTokens(const simplecpp::TokenList *tokenList) else mFiles.clear(); - _isC = _isCPP = false; + mIsC = mIsCpp = false; if (!mFiles.empty()) { - _isC = Path::isC(getSourceFilePath()); - _isCPP = Path::isCPP(getSourceFilePath()); + mIsC = Path::isC(getSourceFilePath()); + mIsCpp = Path::isCPP(getSourceFilePath()); } if (mSettings && mSettings->enforcedLang != Settings::None) { - _isC = (mSettings->enforcedLang == Settings::C); - _isCPP = (mSettings->enforcedLang == Settings::CPP); + mIsC = (mSettings->enforcedLang == Settings::C); + mIsCpp = (mSettings->enforcedLang == Settings::CPP); } for (const simplecpp::Token *tok = tokenList->cfront(); tok; tok = tok->next) { diff --git a/lib/tokenlist.h b/lib/tokenlist.h index 39d58c36d..a2106d322 100644 --- a/lib/tokenlist.h +++ b/lib/tokenlist.h @@ -55,12 +55,12 @@ public: /** Is the code C. Used for bailouts */ bool isC() const { - return _isC; + return mIsC; } /** Is the code CPP. Used for bailouts */ bool isCPP() const { - return _isCPP; + return mIsCpp; } /** @@ -191,7 +191,7 @@ private: const Settings* mSettings; /** File is known to be C/C++ code */ - bool _isC, _isCPP; + bool mIsC, mIsCpp; }; /// @}