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

Method GetChildren

Source/Objects/movementobject.cpp:117–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void MovementObject::GetChildren(std::vector<Object*>* ret_children) {
118 if (!env_object_attach_data.empty()) {
119 std::vector<AttachedEnvObject> attached_env_objects;
120 Deserialize(env_object_attach_data, attached_env_objects);
121 ret_children->reserve(attached_env_objects.size());
122 for (auto& attached_env_object : attached_env_objects) {
123 Object* obj = attached_env_object.direct_ptr;
124 if (obj) {
125 ret_children->push_back(attached_env_object.direct_ptr);
126 }
127 }
128 }
129}
130
131void MovementObject::GetBottomUpCompleteChildren(std::vector<Object*>* ret_children) {
132 if (!env_object_attach_data.empty()) {

Callers

nothing calls this directly

Calls 5

DeserializeFunction · 0.85
emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected