MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / Add

Method Add

Editor/Objects/SafeObjectsArray.cpp:37–50  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

35
36//////////////////////////////////////////////////////////////////////////
37void CSafeObjectsArray::Add( CBaseObject *obj )
38{
39 // Not add NULL object.
40 if (!obj)
41 return;
42
43 // Check if object is unique in array.
44 if (!stl::find( m_objects,obj ))
45 {
46 m_objects.push_back(obj);
47 // Make reference on this object.
48 obj->AddEventListener( functor(*this,&CSafeObjectsArray::OnTargetEvent) );
49 }
50}
51
52//////////////////////////////////////////////////////////////////////////
53void CSafeObjectsArray::Remove( CBaseObject *obj )

Callers 10

CalcBBoxMethod · 0.45
AddEntityMethod · 0.45
DisplayMethod · 0.45
CalcBoundsMethod · 0.45
AddUpdateListenerMethod · 0.45
GetBoundBoxMethod · 0.45
GetBoundsMethod · 0.45
CalcBBoxMethod · 0.45

Calls 4

functorFunction · 0.85
findFunction · 0.50
push_backMethod · 0.45
AddEventListenerMethod · 0.45

Tested by

no test coverage detected