This commit is contained in:
Eelco Dolstra 2016-01-28 16:03:32 +01:00
parent 26566cd28e
commit 4fa08f3edb

View file

@ -39,28 +39,28 @@ void printXmlGraph(const PathSet & roots)
PathSet doneSet;
cout << "<?xml version='1.0' encoding='utf-8'?>\n"
<< "<nix>\n";
<< "<nix>\n";
while (!workList.empty()) {
Path path = *(workList.begin());
workList.erase(path);
Path path = *(workList.begin());
workList.erase(path);
if (doneSet.find(path) != doneSet.end()) continue;
doneSet.insert(path);
if (doneSet.find(path) != doneSet.end()) continue;
doneSet.insert(path);
cout << makeNode(path);
cout << makeNode(path);
PathSet references;
store->queryReferences(path, references);
PathSet references;
store->queryReferences(path, references);
for (PathSet::iterator i = references.begin();
i != references.end(); ++i)
{
if (*i != path) {
workList.insert(*i);
cout << makeEdge(*i, path);
}
}
for (PathSet::iterator i = references.begin();
i != references.end(); ++i)
{
if (*i != path) {
workList.insert(*i);
cout << makeEdge(*i, path);
}
}
}