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

Method takeData

lib/token.cpp:338–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338void Token::takeData(Token *fromToken)
339{
340 mStr = fromToken->mStr;
341 tokType(fromToken->mTokType);
342 mFlags = fromToken->mFlags;
343 delete mImpl;
344 mImpl = fromToken->mImpl;
345 fromToken->mImpl = nullptr;
346 if (mImpl->mTemplateSimplifierPointers)
347 // cppcheck-suppress shadowFunction - TODO: fix this
348 for (auto *templateSimplifierPointer : *mImpl->mTemplateSimplifierPointers) {
349 templateSimplifierPointer->token(this);
350 }
351 mLink = fromToken->mLink;
352 if (mLink)
353 mLink->link(this);
354}
355
356void Token::deleteThis()
357{

Callers

nothing calls this directly

Calls 2

tokTypeFunction · 0.85
tokenMethod · 0.80

Tested by

no test coverage detected