tokenizer: Added DeallocateTokens to the destructor so it's not necessary to cleanup manually
This commit is contained in:
parent
9ce8918895
commit
2db69e6072
|
@ -57,8 +57,6 @@ private:
|
|||
// Check for memory leaks..
|
||||
CheckBufferOverrunClass checkBufferOverrun( &tokenizer, this );
|
||||
checkBufferOverrun.CheckBufferOverrun();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
void run()
|
||||
|
|
|
@ -60,8 +60,6 @@ private:
|
|||
// Check for memory leaks..
|
||||
CheckOther checkOther( &tokenizer, this );
|
||||
checkOther.CheckCharVariable();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
void array_index()
|
||||
|
|
|
@ -51,8 +51,6 @@ private:
|
|||
settings._checkCodingStyle = true;
|
||||
CheckClass checkClass( &tokenizer, settings, this );
|
||||
checkClass.CheckConstructors();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
void run()
|
||||
|
|
|
@ -51,8 +51,6 @@ private:
|
|||
// Check for memory leaks..
|
||||
CheckOther checkOther( &tokenizer, this );
|
||||
checkOther.CheckUnsignedDivision();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
void run()
|
||||
|
|
|
@ -50,8 +50,6 @@ private:
|
|||
// Check for unused variables..
|
||||
CheckOther checkOther( &tokenizer, this );
|
||||
checkOther.CheckIncompleteStatement();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
void run()
|
||||
|
|
|
@ -54,8 +54,6 @@ private:
|
|||
tokenizer.FillFunctionList(0);
|
||||
CheckMemoryLeakClass checkMemoryLeak( &tokenizer, settings, this );
|
||||
checkMemoryLeak.CheckMemoryLeak();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
void run()
|
||||
|
|
|
@ -82,8 +82,6 @@ private:
|
|||
|
||||
// Compare..
|
||||
ASSERT_EQUALS( true, cmptok(expected, tokenizer.tokens()) );
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,8 +97,6 @@ private:
|
|||
|
||||
// Expected result..
|
||||
ASSERT_EQUALS( std::string(10000,'a'), std::string(tokenizer.tokens()->str) );
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
|
||||
|
@ -135,8 +131,6 @@ private:
|
|||
|
||||
// Compare..
|
||||
ASSERT_EQUALS( true, cmptok(expected, tokenizer.tokens()) );
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,8 +57,6 @@ private:
|
|||
settings._checkCodingStyle = true;
|
||||
CheckClass checkClass( &tokenizer, settings, this );
|
||||
checkClass.CheckUnusedPrivateFunctions();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -49,8 +49,6 @@ private:
|
|||
// Check for unused variables..
|
||||
CheckOther checkOther( &tokenizer, this );
|
||||
checkOther.CheckStructMemberUsage();
|
||||
|
||||
tokenizer.DeallocateTokens();
|
||||
}
|
||||
|
||||
void run()
|
||||
|
|
|
@ -58,7 +58,7 @@ Tokenizer::Tokenizer(ErrorLogger *errorLogger)
|
|||
|
||||
Tokenizer::~Tokenizer()
|
||||
{
|
||||
|
||||
DeallocateTokens();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue