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

Method setId

Engine/source/console/simObject.cpp:757–773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

755//-----------------------------------------------------------------------------
756
757void SimObject::setId(SimObjectId newId)
758{
759 if(!mFlags.test(Added))
760 mId = newId;
761 else
762 {
763 // get this object out of the id dictionary if it's in it
764 Sim::gIdDictionary->remove(this);
765
766 // Free current Id.
767 // Assign new one.
768 mId = newId ? newId : Sim::gNextObjectId++;
769 Sim::gIdDictionary->insert(this);
770 }
771
772 dSprintf( mIdString, sizeof( mIdString ), "%u", mId );
773}
774
775//-----------------------------------------------------------------------------
776

Callers 2

initRootFunction · 0.45

Calls 4

dSprintfFunction · 0.85
testMethod · 0.45
removeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected