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

Unified Diff: samplecode/SampleEncode.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 | « samplecode/SampleEffects.cpp ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleEncode.cpp
diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp
index 185208b35bd8bece2ddd4d4049594493e4dbbff4..9ca7d8ae462d76b1fff3c98c982a51b8722bf61c 100644
--- a/samplecode/SampleEncode.cpp
+++ b/samplecode/SampleEncode.cpp
@@ -65,7 +65,7 @@ static void make_image(SkBitmap* bm, SkColorType ct, int configIndex) {
}
}
SkColorTable* ctable = new SkColorTable(colors, 256);
- bm->allocPixels(info, NULL, ctable);
+ bm->allocPixels(info, nullptr, ctable);
ctable->unref();
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
@@ -122,13 +122,13 @@ public:
for (size_t j = 0; j < SK_ARRAY_COUNT(gTypes); j++) {
SkAutoTDelete<SkImageEncoder> codec(
SkImageEncoder::Create(gTypes[j]));
- if (NULL == codec.get()) {
+ if (nullptr == codec.get()) {
SkDebugf("[%s:%d] failed to encode %s%s\n",
__FILE__, __LINE__,gConfigLabels[i], gExt[j]);
continue;
}
SkAutoDataUnref data(codec->encodeData(fBitmaps[i], 100));
- if (NULL == data.get()) {
+ if (nullptr == data.get()) {
SkDebugf("[%s:%d] failed to encode %s%s\n",
__FILE__, __LINE__,gConfigLabels[i], gExt[j]);
continue;
@@ -186,7 +186,7 @@ protected:
yy += SkIntToScalar(fBitmaps[i].height() + 10);
SkBitmap bm;
- SkData* encoded = NULL;
+ SkData* encoded = nullptr;
if (SkImageEncoder::kJPEG_Type == gTypes[j]) {
encoded = fEncodedJPEGs[i].get();
} else if (SkImageEncoder::kPNG_Type == gTypes[j]) {
@@ -219,7 +219,7 @@ protected:
virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y,
unsigned modi) {
- this->inval(NULL);
+ this->inval(nullptr);
return this->INHERITED::onFindClickHandler(x, y, modi);
}
« no previous file with comments | « samplecode/SampleEffects.cpp ('k') | samplecode/SampleFatBits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698