diff options
author | Thiago Farina <tfarina@chromium.org> | 2016-04-22 17:44:14 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-04-22 21:19:22 +0000 |
commit | ac619562934b41e201ca5fb917310cb145bf5dd8 (patch) | |
tree | a5c269041c9f7aad87ca557c4aa42f0933bbd876 | |
parent | 2152bc174ee5be48b95d976bdd3e4f6a2b6e2c71 (diff) |
cpp: keep the documentation of MakeAbsolute() function up-to-date
commit 2ad804cef42f: ("Fixed bugs blocking bazel shell test on Windows"),
updated the documentation in blaze_util.cc but forgot to update
the same doc comment in the header file.
To prevent this from happening again, this copies the added sentence
to the header file and deletes the documentation from the source file.
--
Change-Id: I240b3a31d7b457ef4d50558f1ca54619666b8d2c
Reviewed-on: https://bazel-review.googlesource.com/#/c/3470
MOS_MIGRATED_REVID=120561630
-rw-r--r-- | src/main/cpp/blaze_util.cc | 7 | ||||
-rw-r--r-- | src/main/cpp/blaze_util.h | 1 |
2 files changed, 1 insertions, 7 deletions
diff --git a/src/main/cpp/blaze_util.cc b/src/main/cpp/blaze_util.cc index 912f825680..5740cb4f0f 100644 --- a/src/main/cpp/blaze_util.cc +++ b/src/main/cpp/blaze_util.cc @@ -57,13 +57,6 @@ string GetUserName() { return pwent->pw_name; } -// Returns the given path in absolute form. Does not change paths that are -// already absolute. -// -// If called from working directory "/bar": -// MakeAbsolute("foo") --> "/bar/foo" -// MakeAbsolute("/foo") ---> "/foo" -// MakeAbsolute("C:/foo") ---> "C:/foo" string MakeAbsolute(const string &path) { // Check if path is already absolute. if (path.empty() || path[0] == '/' || (isalpha(path[0]) && path[1] == ':')) { diff --git a/src/main/cpp/blaze_util.h b/src/main/cpp/blaze_util.h index 9222734e7b..e0d1b2b669 100644 --- a/src/main/cpp/blaze_util.h +++ b/src/main/cpp/blaze_util.h @@ -37,6 +37,7 @@ string GetUserName(); // If called from working directory "/bar": // MakeAbsolute("foo") --> "/bar/foo" // MakeAbsolute("/foo") ---> "/foo" +// MakeAbsolute("C:/foo") ---> "C:/foo" string MakeAbsolute(const string &path); // mkdir -p path. All newly created directories use the given mode. |