* 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. */
| 408 | * This compares all fields of the Require structs in the sets. |
| 409 | */ |
| 410 | static bool deepCompare(const std::set<Meta::Require> & a, const std::set<Meta::Require> & b) |
| 411 | { |
| 412 | // NOTE: this needs to be rewritten if the type of Meta::RequireSet changes |
| 413 | if(a.size() != b.size()) |
| 414 | { |
| 415 | return false; |
| 416 | } |
| 417 | for(const auto & reqA :a) |
| 418 | { |
| 419 | const auto &iter2 = b.find(reqA); |
| 420 | if(iter2 == b.cend()) |
| 421 | { |
| 422 | return false; |
| 423 | } |
| 424 | const auto & reqB = *iter2; |
| 425 | if(!reqA.deepEquals(reqB)) |
| 426 | { |
| 427 | return false; |
| 428 | } |
| 429 | } |
| 430 | return true; |
| 431 | } |
| 432 | |
| 433 | void Component::updateCachedData() |
| 434 | { |
no test coverage detected