* 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. */
| 373 | * This compares all fields of the Require structs in the sets. |
| 374 | */ |
| 375 | static bool deepCompare(const std::set<Meta::Require> & a, const std::set<Meta::Require> & b) |
| 376 | { |
| 377 | // NOTE: this needs to be rewritten if the type of Meta::RequireSet changes |
| 378 | if(a.size() != b.size()) |
| 379 | { |
| 380 | return false; |
| 381 | } |
| 382 | for(const auto & reqA :a) |
| 383 | { |
| 384 | const auto &iter2 = b.find(reqA); |
| 385 | if(iter2 == b.cend()) |
| 386 | { |
| 387 | return false; |
| 388 | } |
| 389 | const auto & reqB = *iter2; |
| 390 | if(!reqA.deepEquals(reqB)) |
| 391 | { |
| 392 | return false; |
| 393 | } |
| 394 | } |
| 395 | return true; |
| 396 | } |
| 397 | |
| 398 | void Component::updateCachedData() |
| 399 | { |
no test coverage detected