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; PathSet doneSet;
cout << "<?xml version='1.0' encoding='utf-8'?>\n" cout << "<?xml version='1.0' encoding='utf-8'?>\n"
<< "<nix>\n"; << "<nix>\n";
while (!workList.empty()) { while (!workList.empty()) {
Path path = *(workList.begin()); Path path = *(workList.begin());
workList.erase(path); workList.erase(path);
if (doneSet.find(path) != doneSet.end()) continue; if (doneSet.find(path) != doneSet.end()) continue;
doneSet.insert(path); doneSet.insert(path);
cout << makeNode(path); cout << makeNode(path);
PathSet references; PathSet references;
store->queryReferences(path, references); store->queryReferences(path, references);
for (PathSet::iterator i = references.begin(); for (PathSet::iterator i = references.begin();
i != references.end(); ++i) i != references.end(); ++i)
{ {
if (*i != path) { if (*i != path) {
workList.insert(*i); workList.insert(*i);
cout << makeEdge(*i, path); cout << makeEdge(*i, path);
} }
} }
} }