summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-04-23 00:03:15 (GMT)
committerEvan Martin <martine@danga.com>2011-04-23 00:06:55 (GMT)
commitf67b7c25008b1777600b8e8a35a847bdcf3bc4bc (patch)
tree5317ba28e98f26ebb141572a7cf2c28e078fe5d9 /src/util.h
parente587ab486e9e448c24b78f34ec3935efc1df50ae (diff)
downloadNinja-f67b7c25008b1777600b8e8a35a847bdcf3bc4bc.zip
Ninja-f67b7c25008b1777600b8e8a35a847bdcf3bc4bc.tar.gz
Ninja-f67b7c25008b1777600b8e8a35a847bdcf3bc4bc.tar.bz2
optimize CanonicalizePath
Null build of Chrome: before I added extra calls to CanonicalizePath: 1.25s. with extra calls to CanonicalizePath: 1.35s. with new CanonicalizePath: 1.05s. And now CanonicalizePath isn't hot on profiles anymore.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index dc3e40f..3d4d33c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -17,6 +17,7 @@
#pragma once
#include <string>
+using namespace std;
// Log a fatal message, dump a backtrace, and exit.
void Fatal(const char* msg, ...);
@@ -25,6 +26,6 @@ void Fatal(const char* msg, ...);
void Error(const char* msg, ...);
// Canonicalize a path like "foo/../bar.h" into just "bar.h".
-bool CanonicalizePath(std::string* path, std::string* err);
+bool CanonicalizePath(string* path, string* err);
#endif // NINJA_UTIL_H_