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

Unified Diff: src/codec/SkCodec_libico.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/codec/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_libpng.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec_libico.cpp
diff --git a/src/codec/SkCodec_libico.cpp b/src/codec/SkCodec_libico.cpp
index e8e6531a06c7c29db550643443653a7c47330589..6f343369c4cc0cb389d641728e962235ff4538e6 100644
--- a/src/codec/SkCodec_libico.cpp
+++ b/src/codec/SkCodec_libico.cpp
@@ -45,14 +45,14 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
if (inputStream.get()->read(dirBuffer.get(), kIcoDirectoryBytes) !=
kIcoDirectoryBytes) {
SkCodecPrintf("Error: unable to read ico directory header.\n");
- return NULL;
+ return nullptr;
}
// Process the directory header
const uint16_t numImages = get_short(dirBuffer.get(), 4);
if (0 == numImages) {
SkCodecPrintf("Error: No images embedded in ico.\n");
- return NULL;
+ return nullptr;
}
// Ensure that we can read all of indicated directory entries
@@ -60,7 +60,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
if (inputStream.get()->read(entryBuffer.get(), numImages*kIcoDirEntryBytes) !=
numImages*kIcoDirEntryBytes) {
SkCodecPrintf("Error: unable to read ico directory entries.\n");
- return NULL;
+ return nullptr;
}
// This structure is used to represent the vital information about entries
@@ -131,7 +131,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
// Create a new stream for the embedded codec
SkAutoTUnref<SkData> data(
SkData::NewFromStream(inputStream.get(), size));
- if (NULL == data.get()) {
+ if (nullptr == data.get()) {
SkCodecPrintf("Warning: could not create embedded stream.\n");
break;
}
@@ -141,7 +141,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
// Check if the embedded codec is bmp or png and create the codec
const bool isPng = SkPngCodec::IsPng(embeddedStream);
SkAssertResult(embeddedStream->rewind());
- SkCodec* codec = NULL;
+ SkCodec* codec = nullptr;
if (isPng) {
codec = SkPngCodec::NewFromStream(embeddedStream.detach());
} else {
@@ -149,7 +149,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
}
// Save a valid codec
- if (NULL != codec) {
+ if (nullptr != codec) {
codecs->push_back().reset(codec);
}
}
@@ -157,7 +157,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
// Recognize if there are no valid codecs
if (0 == codecs->count()) {
SkCodecPrintf("Error: could not find any valid embedded ico codecs.\n");
- return NULL;
+ return nullptr;
}
// Use the largest codec as a "suggestion" for image info
@@ -195,7 +195,7 @@ SkCodec* SkIcoCodec::NewFromStream(SkStream* stream) {
*/
SkIcoCodec::SkIcoCodec(const SkImageInfo& info,
SkTArray<SkAutoTDelete<SkCodec>, true>* codecs)
- : INHERITED(info, NULL)
+ : INHERITED(info, nullptr)
, fEmbeddedCodecs(codecs)
{}
« no previous file with comments | « src/codec/SkCodec_libgif.cpp ('k') | src/codec/SkCodec_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698