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

Method remove

Engine/source/console/consoleInternal.cpp:341–357  ·  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

339
340// deleteVariables() assumes remove() is a stable remove (will not reorder entries on remove)
341void Dictionary::remove(Dictionary::Entry *ent)
342{
343 Entry **walk = &hashTable->data[HashPointer(ent->name) % hashTable->size];
344 while(*walk != ent)
345 walk = &((*walk)->nextEntry);
346
347 #ifdef DEBUG_SPEW
348 Platform::outputDebugString( "[ConsoleInternal] Removing entry '%s'", ent->name );
349 #endif
350
351 *walk = (ent->nextEntry);
352
353 destructInPlace( ent );
354 hashTable->mChunker.free( ent );
355
356 hashTable->count--;
357}
358
359Dictionary::Dictionary()
360 : hashTable( NULL ),

Callers 1

removeVariableNotifyMethod · 0.45

Calls 3

HashPointerFunction · 0.85
destructInPlaceFunction · 0.85
freeMethod · 0.45

Tested by

no test coverage detected