diff options
author | halcanary <halcanary@google.com> | 2015-08-27 07:41:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-27 07:41:16 -0700 |
commit | 96fcdcc219d2a0d3579719b84b28bede76efba64 (patch) | |
tree | 0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /src/utils/SkParse.cpp | |
parent | 435af2f736c85c3274a0c6760a3523810750d237 (diff) |
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002
Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'src/utils/SkParse.cpp')
-rw-r--r-- | src/utils/SkParse.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/utils/SkParse.cpp b/src/utils/SkParse.cpp index 446f9d444a..b5a108e2cb 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 ',' |