projects
/
platform
/
upstream
/
ninja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ae1823
)
Fix backslashes in graphviz causing incorrect rendering on windows.
author
Spencer Judge
<sjudge@tableausoftware.com>
Tue, 7 Apr 2015 21:18:43 +0000
(14:18 -0700)
committer
Spencer Judge
<sjudge@tableausoftware.com>
Wed, 8 Apr 2015 16:28:28 +0000
(09:28 -0700)
src/graphviz.cc
patch
|
blob
|
history
diff --git
a/src/graphviz.cc
b/src/graphviz.cc
index
8354a22
..
dce8b32
100644
(file)
--- a/
src/graphviz.cc
+++ b/
src/graphviz.cc
@@
-15,6
+15,7
@@
#include "graphviz.h"
#include <stdio.h>
+#include <algorithm>
#include "graph.h"
@@
-22,7
+23,9
@@
void GraphViz::AddTarget(Node* node) {
if (visited_nodes_.find(node) != visited_nodes_.end())
return;
- printf("\"%p\" [label=\"%s\"]\n", node, node->path().c_str());
+ string pathstr = node->path();
+ replace(pathstr.begin(), pathstr.end(), '\\', '/');
+ printf("\"%p\" [label=\"%s\"]\n", node, pathstr.c_str());
visited_nodes_.insert(node);
Edge* edge = node->in_edge();