diff options
author | Evan Martin <martine@danga.com> | 2012-08-10 20:27:08 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-08-10 20:44:40 (GMT) |
commit | d58a10965610eb6b338e411ce816b810d76ab59e (patch) | |
tree | f5e9627cb0fcd0c2f62665388fa93f284ba318ee /src/util.cc | |
parent | d98ba72ef8adfb1698b8de197de6751c8b14d5c0 (diff) | |
download | Ninja-d58a10965610eb6b338e411ce816b810d76ab59e.zip Ninja-d58a10965610eb6b338e411ce816b810d76ab59e.tar.gz Ninja-d58a10965610eb6b338e411ce816b810d76ab59e.tar.bz2 |
windows: fix size_t<->int conversions in ninja.exe
Diffstat (limited to 'src/util.cc')
-rw-r--r-- | src/util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.cc b/src/util.cc index 7c2f895..90a1d45 100644 --- a/src/util.cc +++ b/src/util.cc @@ -81,7 +81,7 @@ void Error(const char* msg, ...) { bool CanonicalizePath(string* path, string* err) { METRIC_RECORD("canonicalize str"); - int len = path->size(); + size_t len = path->size(); char* str = 0; if (len > 0) str = &(*path)[0]; @@ -91,7 +91,7 @@ bool CanonicalizePath(string* path, string* err) { return true; } -bool CanonicalizePath(char* path, int* len, string* err) { +bool CanonicalizePath(char* path, size_t* len, string* err) { // WARNING: this function is performance-critical; please benchmark // any changes you make to it. METRIC_RECORD("canonicalize path"); @@ -323,7 +323,7 @@ string ElideMiddle(const string& str, size_t width) { const int kMargin = 3; // Space for "...". string result = str; if (result.size() + kMargin > width) { - int elide_size = (width - kMargin) / 2; + size_t elide_size = (width - kMargin) / 2; result = result.substr(0, elide_size) + "..." + result.substr(result.size() - elide_size, elide_size); |