* deep inspecting compare for requirement sets * By default, only uids are compared for set operations. * This compares all fields of the Require structs in the sets. */
| 396 | * This compares all fields of the Require structs in the sets. |
| 397 | */ |
| 398 | static bool deepCompare(const std::set<Meta::Require>& a, const std::set<Meta::Require>& b) |
| 399 | { |
| 400 | // NOTE: this needs to be rewritten if the type of Meta::RequireSet changes |
| 401 | if (a.size() != b.size()) { |
| 402 | return false; |
| 403 | } |
| 404 | for (const auto& reqA : a) { |
| 405 | const auto& iter2 = b.find(reqA); |
| 406 | if (iter2 == b.cend()) { |
| 407 | return false; |
| 408 | } |
| 409 | const auto& reqB = *iter2; |
| 410 | if (!reqA.deepEquals(reqB)) { |
| 411 | return false; |
| 412 | } |
| 413 | } |
| 414 | return true; |
| 415 | } |
| 416 | |
| 417 | void Component::updateCachedData() |
| 418 | { |
no test coverage detected