MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / SetIdToObjectMapValue

Function SetIdToObjectMapValue

Source/Main/scenegraph.cpp:230–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228//-----------------------------------------------------------------------------
229
230static void SetIdToObjectMapValue(std::vector<Object*>& object_from_id_map_, int id, Object* value) {
231 if (object_from_id_map_.size() <= id) {
232 object_from_id_map_.resize((id + 1) * 2);
233 }
234 object_from_id_map_[id] = value;
235}
236
237static Object* GetIdToObjectMapValue(std::vector<Object*>& object_from_id_map_, int id) {
238 Object* result = NULL;

Callers 4

AssignIDMethod · 0.85
LinkObjectMethod · 0.85
UnlinkObjectMethod · 0.85
GetAndReserveIDMethod · 0.85

Calls 2

sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected