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

Unified Diff: src/core/SkValidatingReadBuffer.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/SkUtilsArm.cpp ('k') | src/core/SkVarAlloc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkValidatingReadBuffer.cpp
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
index fd00e7d9897577950535c304400c6aadcc8be512..e00613b8b5684699fc0630270f2eef32ade38bc4 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -111,7 +111,7 @@ void* SkValidatingReadBuffer::readEncodedString(size_t* length, SkPaint::TextEnc
this->validate(encodingType == encoding);
*length = this->readInt();
const void* ptr = this->skip(SkAlign4(*length));
- void* data = NULL;
+ void* data = nullptr;
if (!fError) {
data = sk_malloc_throw(*length);
memcpy(data, ptr, *length);
@@ -214,7 +214,7 @@ uint32_t SkValidatingReadBuffer::getArrayCount() {
SkTypeface* SkValidatingReadBuffer::readTypeface() {
// TODO: Implement this (securely) when needed
- return NULL;
+ return nullptr;
}
bool SkValidatingReadBuffer::validateAvailable(size_t size) {
@@ -225,24 +225,24 @@ SkFlattenable* SkValidatingReadBuffer::readFlattenable(SkFlattenable::Type type)
SkString name;
this->readString(&name);
if (fError) {
- return NULL;
+ return nullptr;
}
// Is this the type we wanted ?
const char* cname = name.c_str();
SkFlattenable::Type baseType;
if (!SkFlattenable::NameToType(cname, &baseType) || (baseType != type)) {
- return NULL;
+ return nullptr;
}
SkFlattenable::Factory factory = SkFlattenable::NameToFactory(cname);
- if (NULL == factory) {
- return NULL; // writer failed to give us the flattenable
+ if (nullptr == factory) {
+ return nullptr; // writer failed to give us the flattenable
}
// if we get here, factory may still be null, but if that is the case, the
// failure was ours, not the writer.
- SkFlattenable* obj = NULL;
+ SkFlattenable* obj = nullptr;
uint32_t sizeRecorded = this->readUInt();
if (factory) {
size_t offset = fReader.offset();
@@ -253,7 +253,7 @@ SkFlattenable* SkValidatingReadBuffer::readFlattenable(SkFlattenable::Type type)
if (fError) {
// we could try to fix up the offset...
SkSafeUnref(obj);
- obj = NULL;
+ obj = nullptr;
}
} else {
// we must skip the remaining data
« no previous file with comments | « src/core/SkUtilsArm.cpp ('k') | src/core/SkVarAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698