MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / deleteThis

Method deleteThis

lib/token.cpp:356–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356void Token::deleteThis()
357{
358 if (mNext) { // Copy next to this and delete next
359 takeData(mNext);
360 mNext->link(nullptr); // mark as unlinked
361 deleteNext();
362 } else if (mPrevious) { // Copy previous to this and delete previous
363 takeData(mPrevious);
364 mPrevious->link(nullptr);
365 deletePrevious();
366 } else {
367 // We are the last token in the list, we can't delete
368 // ourselves, so just make us empty
369 str(";");
370 }
371}
372
373void Token::replace(Token *replaceThis, Token *start, Token *end)
374{

Callers 15

simplifyPlatformTypesMethod · 0.80
simplifyStdTypeMethod · 0.80
deleteTokenMethod · 0.80
expandTemplateMethod · 0.80
simplifyTemplateArgsMethod · 0.80
simplifyCalculationsMethod · 0.80
simplifyTemplatesMethod · 0.80
deleteInvalidTypedefMethod · 0.80
simplifyTypedefLHSMethod · 0.80

Calls 1

strFunction · 0.85

Tested by

no test coverage detected