MCPcopy Create free account
hub / github.com/beefytech/Beef / UntrackName

Method UntrackName

IDEHelper/Compiler/BfSystem.cpp:2372–2402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2370}
2371
2372void BfSystem::UntrackName(BfTypeDef* typeDef)
2373{
2374 BfAtom* nameAtom = typeDef->mName;
2375 if (nameAtom != mEmptyAtom)
2376 {
2377 nameAtom->mAtomUpdateIdx = ++mAtomUpdateIdx;
2378 }
2379
2380 if ((!typeDef->mIsCombinedPartial) && (!typeDef->IsEmitted()))
2381 {
2382 for (int i = 0; i < (int)typeDef->mFullName.mSize - 1; i++)
2383 {
2384 auto prevAtom = typeDef->mFullName.mParts[i];
2385 auto atom = typeDef->mFullName.mParts[i + 1];
2386
2387 auto itr = atom->mPrevNamesMap.Find(prevAtom);
2388 if (itr != atom->mPrevNamesMap.end())
2389 {
2390 int& count = itr->mValue;
2391 if (--count == 0)
2392 {
2393 atom->mPrevNamesMap.Remove(itr);
2394 }
2395 }
2396 else
2397 {
2398 BF_DBG_FATAL("Unable to untrack name");
2399 }
2400 }
2401 }
2402}
2403
2404void BfSystem::CreateBasicTypes()
2405{

Callers 1

FreeMembersMethod · 0.80

Calls 4

IsEmittedMethod · 0.45
FindMethod · 0.45
endMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected