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

Method deleteNext

lib/token.cpp:272–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void Token::deleteNext(nonneg int count)
273{
274 while (mNext && count > 0) {
275 Token *n = mNext;
276
277 // #8154 we are about to be unknown -> destroy the link to us
278 if (n->mLink && n->mLink->mLink == n)
279 n->mLink->link(nullptr);
280
281 mNext = n->next();
282 delete n;
283 --count;
284 }
285
286 if (mNext)
287 mNext->previous(this);
288 else
289 mTokensFrontBack->back = this;
290}
291
292void Token::deletePrevious(nonneg int count)
293{

Callers 15

gettokenlistfromvalidFunction · 0.80
~ArgumentInfoMethod · 0.80
simplifyPlatformTypesMethod · 0.80
eraseTokensMethod · 0.80
simplifyTemplateArgsMethod · 0.80
simplifyCalculationsMethod · 0.80
simplifyTemplatesMethod · 0.80
eraseTokensMethod · 0.80
deleteInvalidTypedefMethod · 0.80

Calls 1

nextMethod · 0.80

Tested by 1

deleteLastMethod · 0.64