summaryrefslogtreecommitdiffstats
path: root/src/graph.cc
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-07-10 19:15:00 (GMT)
committerNico Weber <thakis@chromium.org>2015-07-10 19:15:00 (GMT)
commitf30508e79dad5c9e8903214a6b9d578e10318960 (patch)
tree198a4db28b0ab97afc0aa49409a455e6a28bd948 /src/graph.cc
parenta05d4644d13624e716093fc4bd88a21e6d20223c (diff)
downloadNinja-f30508e79dad5c9e8903214a6b9d578e10318960.zip
Ninja-f30508e79dad5c9e8903214a6b9d578e10318960.tar.gz
Ninja-f30508e79dad5c9e8903214a6b9d578e10318960.tar.bz2
win: print right slashes in 'unknown target' message
Diffstat (limited to 'src/graph.cc')
-rw-r--r--src/graph.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/graph.cc b/src/graph.cc
index 355285c..9e65675 100644
--- a/src/graph.cc
+++ b/src/graph.cc
@@ -347,12 +347,13 @@ bool Edge::use_console() const {
return pool() == &State::kConsolePool;
}
-string Node::PathDecanonicalized() const {
- string result = path_;
+// static
+string Node::PathDecanonicalized(const string& path, unsigned int slash_bits) {
+ string result = path;
#ifdef _WIN32
unsigned int mask = 1;
for (char* c = &result[0]; (c = strchr(c, '/')) != NULL;) {
- if (slash_bits_ & mask)
+ if (slash_bits & mask)
*c = '\\';
c++;
mask <<= 1;