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