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

Unified Diff: src/utils/SkParse.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 | « src/utils/SkOSFile.cpp ('k') | src/utils/SkParseColor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkParse.cpp
diff --git a/src/utils/SkParse.cpp b/src/utils/SkParse.cpp
index 446f9d444a569fb8814371bfab2721dd8eb60caf..b5a108e2cb3629d37055c23a83839471be3353fb 100644
--- a/src/utils/SkParse.cpp
+++ b/src/utils/SkParse.cpp
@@ -112,7 +112,7 @@ const char* SkParse::FindHex(const char str[], uint32_t* value)
str = skip_ws(str);
if (!is_hex(*str))
- return NULL;
+ return nullptr;
uint32_t n = 0;
int max_digits = 8;
@@ -121,7 +121,7 @@ const char* SkParse::FindHex(const char str[], uint32_t* value)
while ((digit = to_hex(*str)) >= 0)
{
if (--max_digits < 0)
- return NULL;
+ return nullptr;
n = (n << 4) | digit;
str += 1;
}
@@ -132,7 +132,7 @@ const char* SkParse::FindHex(const char str[], uint32_t* value)
*value = n;
return str;
}
- return NULL;
+ return nullptr;
}
const char* SkParse::FindS32(const char str[], int32_t* value)
@@ -148,7 +148,7 @@ const char* SkParse::FindS32(const char str[], int32_t* value)
}
if (!is_digit(*str))
- return NULL;
+ return nullptr;
int n = 0;
while (is_digit(*str))
@@ -174,7 +174,7 @@ const char* SkParse::FindMSec(const char str[], SkMSec* value)
}
if (!is_digit(*str))
- return NULL;
+ return nullptr;
int n = 0;
while (is_digit(*str))
@@ -207,7 +207,7 @@ const char* SkParse::FindScalar(const char str[], SkScalar* value) {
char* stop;
float v = (float)strtod(str, &stop);
if (str == stop) {
- return NULL;
+ return nullptr;
}
if (value) {
*value = v;
@@ -224,7 +224,7 @@ const char* SkParse::FindScalars(const char str[], SkScalar value[], int count)
for (;;)
{
str = SkParse::FindScalar(str, value);
- if (--count == 0 || str == NULL)
+ if (--count == 0 || str == nullptr)
break;
// keep going
@@ -272,14 +272,14 @@ int SkParse::FindList(const char target[], const char list[])
const char* end = strchr(list, ',');
size_t entryLen;
- if (end == NULL) // last entry
+ if (end == nullptr) // last entry
entryLen = strlen(list);
else
entryLen = end - list;
if (entryLen == len && memcmp(target, list, len) == 0)
return index;
- if (end == NULL)
+ if (end == nullptr)
break;
list = end + 1; // skip the ','
« no previous file with comments | « src/utils/SkOSFile.cpp ('k') | src/utils/SkParseColor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698