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

Method remove

Engine/source/console/consoleInternal.cpp:355–371  ·  view source on GitHub ↗

deleteVariables() assumes remove() is a stable remove (will not reorder entries on remove)

Source from the content-addressed store, hash-verified

353
354// deleteVariables() assumes remove() is a stable remove (will not reorder entries on remove)
355void Dictionary::remove(Dictionary::Entry *ent)
356{
357 Entry **walk = &hashTable->data[HashPointer(ent->name) % hashTable->size];
358 while (*walk != ent)
359 walk = &((*walk)->nextEntry);
360
361#ifdef DEBUG_SPEW
362 Platform::outputDebugString("[ConsoleInternal] Removing entry '%s'", ent->name);
363#endif
364
365 *walk = (ent->nextEntry);
366
367 destructInPlace(ent);
368 hashTable->mChunker.free(ent);
369
370 hashTable->count--;
371}
372
373Dictionary::Dictionary()
374 : hashTable(NULL),

Callers 1

removeVariableNotifyMethod · 0.45

Calls 3

HashPointerFunction · 0.85
destructInPlaceFunction · 0.85
freeMethod · 0.45

Tested by

no test coverage detected