Rename private member variables
This commit is contained in:
parent
a25461919c
commit
e962f57a99
|
@ -54,7 +54,7 @@ static TimerResults S_timerResults;
|
|||
static const CWE CWE398(398U); // Indicator of Poor Code Quality
|
||||
|
||||
CppCheck::CppCheck(ErrorLogger &errorLogger, bool useGlobalSuppressions)
|
||||
: mErrorLogger(errorLogger), mExitCode(0), mUseGlobalSuppressions(useGlobalSuppressions), tooManyConfigs(false), mSimplify(true)
|
||||
: mErrorLogger(errorLogger), mExitCode(0), mUseGlobalSuppressions(useGlobalSuppressions), mTooManyConfigs(false), mSimplify(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -297,7 +297,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
|||
if (mSettings.isEnabled(Settings::INFORMATION)) {
|
||||
tooManyConfigsError(Path::toNativeSeparators(filename),configurations.size());
|
||||
} else {
|
||||
tooManyConfigs = true;
|
||||
mTooManyConfigs = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -681,10 +681,10 @@ Settings &CppCheck::settings()
|
|||
|
||||
void CppCheck::tooManyConfigsError(const std::string &file, const std::size_t numberOfConfigurations)
|
||||
{
|
||||
if (!mSettings.isEnabled(Settings::INFORMATION) && !tooManyConfigs)
|
||||
if (!mSettings.isEnabled(Settings::INFORMATION) && !mTooManyConfigs)
|
||||
return;
|
||||
|
||||
tooManyConfigs = false;
|
||||
mTooManyConfigs = false;
|
||||
|
||||
if (mSettings.isEnabled(Settings::INFORMATION) && file.empty())
|
||||
return;
|
||||
|
@ -722,7 +722,7 @@ void CppCheck::tooManyConfigsError(const std::string &file, const std::size_t nu
|
|||
|
||||
void CppCheck::purgedConfigurationMessage(const std::string &file, const std::string& configuration)
|
||||
{
|
||||
tooManyConfigs = false;
|
||||
mTooManyConfigs = false;
|
||||
|
||||
if (mSettings.isEnabled(Settings::INFORMATION) && file.empty())
|
||||
return;
|
||||
|
@ -814,7 +814,7 @@ void CppCheck::getErrorMessages()
|
|||
|
||||
purgedConfigurationMessage("","");
|
||||
|
||||
tooManyConfigs = true;
|
||||
mTooManyConfigs = true;
|
||||
tooManyConfigsError("",0U);
|
||||
|
||||
// call all "getErrorMessages" in all registered Check classes
|
||||
|
|
|
@ -218,7 +218,7 @@ private:
|
|||
bool mUseGlobalSuppressions;
|
||||
|
||||
/** Are there too many configs? */
|
||||
bool tooManyConfigs;
|
||||
bool mTooManyConfigs;
|
||||
|
||||
/** Simplify code? true by default */
|
||||
bool mSimplify;
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
#include <cstddef>
|
||||
|
||||
PathMatch::PathMatch(const std::vector<std::string> &excludedPaths, bool caseSensitive)
|
||||
: _excludedPaths(excludedPaths), _caseSensitive(caseSensitive)
|
||||
: mExcludedPaths(excludedPaths), mCaseSensitive(caseSensitive)
|
||||
{
|
||||
if (!_caseSensitive)
|
||||
for (std::vector<std::string>::iterator i = _excludedPaths.begin(); i != _excludedPaths.end(); ++i)
|
||||
if (!mCaseSensitive)
|
||||
for (std::vector<std::string>::iterator i = mExcludedPaths.begin(); i != mExcludedPaths.end(); ++i)
|
||||
std::transform(i->begin(), i->end(), i->begin(), ::tolower);
|
||||
_workingDirectory.push_back(Path::getCurrentPath());
|
||||
mWorkingDirectory.push_back(Path::getCurrentPath());
|
||||
}
|
||||
|
||||
bool PathMatch::match(const std::string &path) const
|
||||
|
@ -39,11 +39,11 @@ bool PathMatch::match(const std::string &path) const
|
|||
if (path.empty())
|
||||
return false;
|
||||
|
||||
for (std::vector<std::string>::const_iterator i = _excludedPaths.begin(); i != _excludedPaths.end(); ++i) {
|
||||
const std::string excludedPath((!Path::isAbsolute(path) && Path::isAbsolute(*i)) ? Path::getRelativePath(*i, _workingDirectory) : *i);
|
||||
for (std::vector<std::string>::const_iterator i = mExcludedPaths.begin(); i != mExcludedPaths.end(); ++i) {
|
||||
const std::string excludedPath((!Path::isAbsolute(path) && Path::isAbsolute(*i)) ? Path::getRelativePath(*i, mWorkingDirectory) : *i);
|
||||
|
||||
std::string findpath = Path::fromNativeSeparators(path);
|
||||
if (!_caseSensitive)
|
||||
if (!mCaseSensitive)
|
||||
std::transform(findpath.begin(), findpath.end(), findpath.begin(), ::tolower);
|
||||
|
||||
// Filtering directory name
|
||||
|
|
|
@ -58,9 +58,9 @@ protected:
|
|||
static std::string removeFilename(const std::string &path);
|
||||
|
||||
private:
|
||||
std::vector<std::string> _excludedPaths;
|
||||
bool _caseSensitive;
|
||||
std::vector<std::string> _workingDirectory;
|
||||
std::vector<std::string> mExcludedPaths;
|
||||
bool mCaseSensitive;
|
||||
std::vector<std::string> mWorkingDirectory;
|
||||
};
|
||||
|
||||
/// @}
|
||||
|
|
Loading…
Reference in New Issue