MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addEntry

Method addEntry

Engine/source/console/simFieldDictionary.cpp:49–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49SimFieldDictionary::Entry *SimFieldDictionary::addEntry(U32 bucket, StringTableEntry slotName, ConsoleBaseType* type, char* value)
50{
51 Entry* ret;
52 if (smFreeList)
53 {
54 ret = smFreeList;
55 smFreeList = ret->next;
56 }
57 else
58 ret = fieldChunker.alloc();
59
60 ret->next = mHashTable[bucket];
61 ret->slotName = slotName;
62 ret->type = type;
63 ret->value = value;
64
65 mHashTable[bucket] = ret;
66 mNumFields++;
67 mVersion++;
68
69 return ret;
70}
71
72void SimFieldDictionary::freeEntry(SimFieldDictionary::Entry *ent)
73{

Callers

nothing calls this directly

Calls 1

allocMethod · 0.45

Tested by

no test coverage detected