astyle formatting
This commit is contained in:
parent
113b3c1d21
commit
cc8a6168e7
|
@ -196,11 +196,11 @@ std::string CppCheck::parseFromArgs(int argc, const char* const argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
// auto deallocated classes..
|
// auto deallocated classes..
|
||||||
else if (strcmp(argv[i], "--auto-dealloc")==0)
|
else if (strcmp(argv[i], "--auto-dealloc") == 0)
|
||||||
{
|
{
|
||||||
++i;
|
++i;
|
||||||
|
|
||||||
if (i >= argc || !strstr(argv[i],".lst"))
|
if (i >= argc || !strstr(argv[i], ".lst"))
|
||||||
return "No .lst file specified for the --auto-dealloc option\n";
|
return "No .lst file specified for the --auto-dealloc option\n";
|
||||||
|
|
||||||
std::ifstream f(argv[i]);
|
std::ifstream f(argv[i]);
|
||||||
|
|
|
@ -45,7 +45,7 @@ Settings::~Settings()
|
||||||
void Settings::autoDealloc(std::istream &istr)
|
void Settings::autoDealloc(std::istream &istr)
|
||||||
{
|
{
|
||||||
std::string line;
|
std::string line;
|
||||||
while (getline(istr,line))
|
while (getline(istr, line))
|
||||||
{
|
{
|
||||||
// Check if line has a valid classname..
|
// Check if line has a valid classname..
|
||||||
if (line.empty())
|
if (line.empty())
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
/** If errors are found, this value is returned from main().
|
/** If errors are found, this value is returned from main().
|
||||||
Default value is 0. */
|
Default value is 0. */
|
||||||
int _exitCode;
|
int _exitCode;
|
||||||
|
|
||||||
/** Fill list of automaticly deallocated classes */
|
/** Fill list of automaticly deallocated classes */
|
||||||
void autoDealloc(std::istream &istr);
|
void autoDealloc(std::istream &istr);
|
||||||
|
|
||||||
|
|
|
@ -1936,8 +1936,8 @@ private:
|
||||||
// Tokenize..
|
// Tokenize..
|
||||||
Tokenizer tokenizer;
|
Tokenizer tokenizer;
|
||||||
{
|
{
|
||||||
std::istringstream istr(code);
|
std::istringstream istr(code);
|
||||||
tokenizer.tokenize(istr, "test.cpp");
|
tokenizer.tokenize(istr, "test.cpp");
|
||||||
}
|
}
|
||||||
tokenizer.setVarId();
|
tokenizer.setVarId();
|
||||||
tokenizer.simplifyTokenList();
|
tokenizer.simplifyTokenList();
|
||||||
|
@ -1949,10 +1949,10 @@ private:
|
||||||
Settings settings;
|
Settings settings;
|
||||||
settings._debug = true;
|
settings._debug = true;
|
||||||
settings._showAll = true;
|
settings._showAll = true;
|
||||||
|
|
||||||
{
|
{
|
||||||
std::istringstream istr(_autoDealloc);
|
std::istringstream istr(_autoDealloc);
|
||||||
settings.autoDealloc(istr);
|
settings.autoDealloc(istr);
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckMemoryLeakClass checkMemoryLeak(&tokenizer, settings, this);
|
CheckMemoryLeakClass checkMemoryLeak(&tokenizer, settings, this);
|
||||||
|
|
Loading…
Reference in New Issue