* Reverse lookup the dependencies of all parents over a given child. * @param tree list to store all parents in (is not cleared) * @param child the child to search the parents' dependencies for */
| 932 | * @param child the child to search the parents' dependencies for |
| 933 | */ |
| 934 | void ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(ConstContentVector &tree, const ContentInfo *child) const |
| 935 | { |
| 936 | tree.push_back(child); |
| 937 | |
| 938 | /* First find all direct parents. We can't use the "normal" iterator as |
| 939 | * we are including stuff into the vector and as such the vector's data |
| 940 | * store can be reallocated (and thus move), which means our iterating |
| 941 | * pointer gets invalid. So fall back to the indices. */ |
| 942 | for (size_t i = 0; i < tree.size(); i++) { |
| 943 | ConstContentVector parents; |
| 944 | this->ReverseLookupDependency(parents, *tree[i]); |
| 945 | |
| 946 | for (const ContentInfo *ci : parents) { |
| 947 | include(tree, ci); |
| 948 | } |
| 949 | } |
| 950 | } |
| 951 | |
| 952 | /** |
| 953 | * Check the dependencies (recursively) of this content info |
no test coverage detected