MCPcopy Create free account
hub / github.com/DFHack/dfhack / map_value_difference

Function map_value_difference

plugins/channel-safely/include/inlines.h:329–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327
328template<class Ctr1, class Ctr2, class Ctr3>
329void map_value_difference(const Ctr1 &c1, const Ctr2 &c2, Ctr3 &c3) {
330 for (const auto &a : c1) {
331 bool matched = false;
332 for (const auto &b : c2) {
333 if (a.second == b.second) {
334 matched = true;
335 break;
336 }
337 }
338 if (!matched) {
339 c3.emplace(a.second);
340 }
341 }
342}

Callers 1

OnUpdateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected