aboutsummaryrefslogtreecommitdiff
path: root/samplecode/SampleEncode.cpp
diff options
context:
space:
mode:
authorhalcanary <halcanary@google.com>2015-08-27 07:41:13 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-27 07:41:16 -0700
commit96fcdcc219d2a0d3579719b84b28bede76efba64 (patch)
tree0ec5ea0193d8292df8bf5ed9dd8498a5eb5763dd /samplecode/SampleEncode.cpp
parent435af2f736c85c3274a0c6760a3523810750d237 (diff)
Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
Diffstat (limited to 'samplecode/SampleEncode.cpp')
-rw-r--r--samplecode/SampleEncode.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/samplecode/SampleEncode.cpp b/samplecode/SampleEncode.cpp
index 185208b35b..9ca7d8ae46 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);
}