Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: tools/skpdiff/skpdiff_util.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/skpdiff/skpdiff_main.cpp ('k') | tools/skpmaker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpdiff/skpdiff_util.cpp
diff --git a/tools/skpdiff/skpdiff_util.cpp b/tools/skpdiff/skpdiff_util.cpp
index 4b5d52110b587f457732765b371cad1d12487771..d33ca24a3ab23bb42aa1261cbdccb080d70275e6 100644
--- a/tools/skpdiff/skpdiff_util.cpp
+++ b/tools/skpdiff/skpdiff_util.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "SkTypes.h"
+
#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
# include <unistd.h>
# include <sys/time.h>
@@ -97,7 +99,7 @@ double get_seconds() {
return currentTime.tv_sec + (double)currentTime.tv_nsec / 1e9;
#elif defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
struct timeval currentTime;
- gettimeofday(&currentTime, NULL);
+ gettimeofday(&currentTime, nullptr);
return currentTime.tv_sec + (double)currentTime.tv_usec / 1e6;
#else
return clock() / (double)CLOCKS_PER_SEC;
@@ -108,11 +110,11 @@ bool get_directory(const char path[], SkTArray<SkString>* entries) {
#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
// Open the directory and check for success
DIR* dir = opendir(path);
- if (NULL == dir) {
+ if (nullptr == dir) {
return false;
}
- // Loop through dir entries until there are none left (i.e. readdir returns NULL)
+ // Loop through dir entries until there are none left (i.e. readdir returns nullptr)
struct dirent* entry;
while ((entry = readdir(dir))) {
// dirent only gives relative paths, we need to join them to the base path to check if they
@@ -167,7 +169,7 @@ bool glob_files(const char globPattern[], SkTArray<SkString>* entries) {
#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX)
// TODO Make sure this works on windows. This may require use of FindNextFile windows function.
glob_t globBuffer;
- if (glob(globPattern, 0, NULL, &globBuffer) != 0) {
+ if (glob(globPattern, 0, nullptr, &globBuffer) != 0) {
return false;
}
@@ -190,13 +192,13 @@ bool glob_files(const char globPattern[], SkTArray<SkString>* entries) {
SkString get_absolute_path(const SkString& path) {
#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_UNIX) || defined(SK_BUILD_FOR_ANDROID)
SkString fullPath(PATH_MAX + 1);
- if (realpath(path.c_str(), fullPath.writable_str()) == NULL) {
+ if (realpath(path.c_str(), fullPath.writable_str()) == nullptr) {
fullPath.reset();
}
return fullPath;
#elif defined(SK_BUILD_FOR_WIN32)
SkString fullPath(MAX_PATH);
- if (_fullpath(fullPath.writable_str(), path.c_str(), MAX_PATH) == NULL) {
+ if (_fullpath(fullPath.writable_str(), path.c_str(), MAX_PATH) == nullptr) {
fullPath.reset();
}
return fullPath;
« no previous file with comments | « tools/skpdiff/skpdiff_main.cpp ('k') | tools/skpmaker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698