commit | 9b636af5b67940f73aa43180b265d41ca6545167 | [log] [tgz] |
---|---|---|
author | tfarina <[email protected]> | Tue Dec 23 00:52:07 2014 |
committer | Commit bot <[email protected]> | Tue Dec 23 00:52:46 2014 |
tree | 4dcade4f91619c4f4ed2e82e9f2a77eb9c356e36 | |
parent | 0acd2d55393fcbc534b9ed2c61349e5543381658 [diff] [blame] |
tools/gn: convert NULL to nullptr all over it. nullptr is one of the C++11 allowed features. See https://chromium-cpp.appspot.com/ and https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/4mijeJHzxLg. This patch was generated with the following command lines: $ ninja -C out/Debug -t compdb cxx > out/Debug/compile_commands.json $ cd out/Debug $ find ../../tools/gn -name '*.cc' | xargs -n 16 -P 32 \ ~/src/repos/llvm/build/bin/clang-modernize -use-nullptr -p . -include \ tools/gn -format -style=Chromium $ ninja gn gn_unittests BUG=None TEST=compiles + gn_unittests [email protected] Review URL: https://codereview.chromium.org/798333005 Cr-Commit-Position: refs/heads/master@{#309505}
diff --git a/tools/gn/filesystem_utils.cc b/tools/gn/filesystem_utils.cc index 700b7b8..89e8a30 100644 --- a/tools/gn/filesystem_utils.cc +++ b/tools/gn/filesystem_utils.cc
@@ -422,7 +422,7 @@ } void NormalizePath(std::string* path) { - char* pathbuf = path->empty() ? NULL : &(*path)[0]; + char* pathbuf = path->empty() ? nullptr : &(*path)[0]; // top_index is the first character we can modify in the path. Anything // before this indicates where the path is relative to.