Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented Nov 2, 2023

The Check objects were just created for that purpose so they basically just were wrappers for the pointers passed into them and were unnecessary.

@firewave
Copy link
Collaborator Author

firewave commented Nov 2, 2023

This is in preparation of #5323.

@firewave firewave changed the title removed the need for Check object in CTU::getUnsafeUsage() callback removed the need for Check object in CTU::getUnsafeUsage() callback / some cleanups Nov 2, 2023
@firewave firewave changed the title removed the need for Check object in CTU::getUnsafeUsage() callback / some cleanups removed the need for Check object in CTU::getUnsafeUsage() callback / some CheckUninitVar cleanups Nov 2, 2023
const Token* CheckUninitVar::isVariableUsage(bool cpp, const Token *vartok, const Library& library, bool pointer, Alloc alloc, int indirect)
const Token* CheckUninitVar::isVariableUsage(const Token *vartok, const Library& library, bool pointer, Alloc alloc, int indirect)
{
const bool cpp = vartok->isCpp();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can simply be taken from Token as it just points back to the TokenList it belongs to. The same applies to Tokenizer::isCPP().

@chrchr-github chrchr-github merged commit 989d276 into danmar:main Nov 3, 2023
@firewave firewave deleted the cut-unsafeusage branch November 3, 2023 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants