checkmemleak.h: use Tokenizer::isJavaOrCSharp()

This commit is contained in:
Jonathan Neuschäfer 2011-12-27 18:01:39 +01:00
parent 7a5627029f
commit f10d314391
1 changed files with 2 additions and 6 deletions

View File

@ -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();