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

Unified Diff: src/core/SkMetaData.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/core/SkMatrixImageFilter.cpp ('k') | src/core/SkMipMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/core/SkMatrixImageFilter.cpp ('k') | src/core/SkMipMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698