Index: src/core/SkMetaData.cpp |
diff --git a/src/core/SkMetaData.cpp b/src/core/SkMetaData.cpp |
index dfc2a949018aadd2989deaa9dc0f9f4a0e346413..dd6ed055711d71498e7c487bfad632acb8182a33 100644 |
--- a/src/core/SkMetaData.cpp |
+++ b/src/core/SkMetaData.cpp |
@@ -27,11 +27,11 @@ void* SkMetaData::RefCntProc(void* ptr, bool doRef) { |
return ptr; |
} |
-SkMetaData::SkMetaData() : fRec(NULL) |
+SkMetaData::SkMetaData() : fRec(nullptr) |
{ |
} |
-SkMetaData::SkMetaData(const SkMetaData& src) : fRec(NULL) |
+SkMetaData::SkMetaData(const SkMetaData& src) : fRec(nullptr) |
{ |
*this = src; |
} |
@@ -55,7 +55,7 @@ void SkMetaData::reset() |
Rec::Free(rec); |
rec = next; |
} |
- fRec = NULL; |
+ fRec = nullptr; |
} |
SkMetaData& SkMetaData::operator=(const SkMetaData& src) |
@@ -86,7 +86,7 @@ SkScalar* SkMetaData::setScalars(const char name[], int count, const SkScalar va |
SkASSERT(count > 0); |
if (count > 0) |
return (SkScalar*)this->set(name, values, sizeof(SkScalar), kScalar_Type, count); |
- return NULL; |
+ return nullptr; |
} |
void SkMetaData::setString(const char name[], const char value[]) |
@@ -179,7 +179,7 @@ const SkScalar* SkMetaData::findScalars(const char name[], int* count, SkScalar |
memcpy(values, rec->data(), rec->fDataCount * rec->fDataLen); |
return (const SkScalar*)rec->data(); |
} |
- return NULL; |
+ return nullptr; |
} |
bool SkMetaData::findPtr(const char name[], void** ptr, PtrProc* proc) const { |
@@ -201,8 +201,8 @@ bool SkMetaData::findPtr(const char name[], void** ptr, PtrProc* proc) const { |
const char* SkMetaData::findString(const char name[]) const |
{ |
const Rec* rec = this->find(name, kString_Type); |
- SkASSERT(rec == NULL || rec->fDataLen == sizeof(char)); |
- return rec ? (const char*)rec->data() : NULL; |
+ SkASSERT(rec == nullptr || rec->fDataLen == sizeof(char)); |
+ return rec ? (const char*)rec->data() : nullptr; |
} |
bool SkMetaData::findBool(const char name[], bool* value) const |
@@ -227,7 +227,7 @@ const void* SkMetaData::findData(const char name[], size_t* length) const { |
} |
return rec->data(); |
} |
- return NULL; |
+ return nullptr; |
} |
const SkMetaData::Rec* SkMetaData::find(const char name[], Type type) const |
@@ -239,12 +239,12 @@ const SkMetaData::Rec* SkMetaData::find(const char name[], Type type) const |
return rec; |
rec = rec->fNext; |
} |
- return NULL; |
+ return nullptr; |
} |
bool SkMetaData::remove(const char name[], Type type) { |
Rec* rec = fRec; |
- Rec* prev = NULL; |
+ Rec* prev = nullptr; |
while (rec) { |
Rec* next = rec->fNext; |
if (rec->fType == type && !strcmp(rec->name(), name)) { |
@@ -309,7 +309,7 @@ void SkMetaData::Iter::reset(const SkMetaData& metadata) { |
} |
const char* SkMetaData::Iter::next(SkMetaData::Type* t, int* count) { |
- const char* name = NULL; |
+ const char* name = nullptr; |
if (fRec) { |
if (t) { |