checkmemleak.h: use Tokenizer::isJavaOrCSharp()
This commit is contained in:
parent
7a5627029f
commit
f10d314391
|
@ -196,10 +196,8 @@ public:
|
||||||
/** @brief run all simplified checks */
|
/** @brief run all simplified checks */
|
||||||
void runSimplifiedChecks(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog) {
|
void runSimplifiedChecks(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog) {
|
||||||
// Don't use these check for Java and C# programs..
|
// Don't use these check for Java and C# programs..
|
||||||
if (tokenizr->getFiles()->at(0).find(".java") != std::string::npos ||
|
if (tokenizr->isJavaOrCSharp())
|
||||||
tokenizr->getFiles()->at(0).find(".cs") != std::string::npos) {
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
CheckMemoryLeakInFunction checkMemoryLeak(tokenizr, settings, errLog);
|
CheckMemoryLeakInFunction checkMemoryLeak(tokenizr, settings, errLog);
|
||||||
checkMemoryLeak.checkReallocUsage();
|
checkMemoryLeak.checkReallocUsage();
|
||||||
|
@ -367,10 +365,8 @@ public:
|
||||||
|
|
||||||
void runSimplifiedChecks(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog) {
|
void runSimplifiedChecks(const Tokenizer *tokenizr, const Settings *settings, ErrorLogger *errLog) {
|
||||||
// Don't use these check for Java and C# programs..
|
// Don't use these check for Java and C# programs..
|
||||||
if (tokenizr->getFiles()->at(0).find(".java") != std::string::npos ||
|
if (tokenizr->isJavaOrCSharp())
|
||||||
tokenizr->getFiles()->at(0).find(".cs") != std::string::npos) {
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
CheckMemoryLeakInClass checkMemoryLeak(tokenizr, settings, errLog);
|
CheckMemoryLeakInClass checkMemoryLeak(tokenizr, settings, errLog);
|
||||||
checkMemoryLeak.check();
|
checkMemoryLeak.check();
|
||||||
|
|
Loading…
Reference in New Issue