MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / AddComponentsFrom

Method AddComponentsFrom

include/RavEngine/ComponentStore.hpp:173–182  ·  view source on GitHub ↗

Copy components from one componentstore into this one @param other the other component store to copy from */

Source from the content-addressed store, hash-verified

171 @param other the other component store to copy from
172 */
173 void AddComponentsFrom(const ComponentStore& other) {
174 for (const auto& c : other.components) {
175 //add the componets of the current type to the global list
176 components[c.first].insert(components[c.first].begin(), c.second.begin(), c.second.end());
177 }
178 //add to the redundant store
179 for (const auto& c : other.componentsRedundant) {
180 componentsRedundant[c.first].insert(componentsRedundant[c.first].begin(), c.second.begin(), c.second.end());
181 }
182 }
183
184 /**
185 Remove components from this store if they are also present in another

Callers 1

tickMethod · 0.80

Calls 3

insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected