From 96fcdcc219d2a0d3579719b84b28bede76efba64 Mon Sep 17 00:00:00 2001 From: halcanary Date: Thu, 27 Aug 2015 07:41:13 -0700 Subject: Style Change: NULL->nullptr DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002 --- tests/PixelRefTest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/PixelRefTest.cpp') diff --git a/tests/PixelRefTest.cpp b/tests/PixelRefTest.cpp index 775354c83d..01e2ce5c0b 100644 --- a/tests/PixelRefTest.cpp +++ b/tests/PixelRefTest.cpp @@ -23,21 +23,21 @@ static void test_dont_leak_install(skiatest::Reporter* reporter) { info = SkImageInfo::MakeN32Premul(0, 0); release_counter = 1; - success = bm.installPixels(info, NULL, 0, NULL, decrement_counter_proc, &release_counter); + success = bm.installPixels(info, nullptr, 0, nullptr, decrement_counter_proc, &release_counter); REPORTER_ASSERT(reporter, true == success); bm.reset(); REPORTER_ASSERT(reporter, 0 == release_counter); info = SkImageInfo::MakeN32Premul(10, 10); release_counter = 1; - success = bm.installPixels(info, NULL, 0, NULL, decrement_counter_proc, &release_counter); + success = bm.installPixels(info, nullptr, 0, nullptr, decrement_counter_proc, &release_counter); REPORTER_ASSERT(reporter, true == success); bm.reset(); REPORTER_ASSERT(reporter, 0 == release_counter); info = SkImageInfo::MakeN32Premul(-10, -10); release_counter = 1; - success = bm.installPixels(info, NULL, 0, NULL, decrement_counter_proc, &release_counter); + success = bm.installPixels(info, nullptr, 0, nullptr, decrement_counter_proc, &release_counter); REPORTER_ASSERT(reporter, false == success); bm.reset(); REPORTER_ASSERT(reporter, 0 == release_counter); @@ -48,12 +48,12 @@ static void test_install(skiatest::Reporter* reporter) { SkImageInfo info = SkImageInfo::MakeN32Premul(0, 0); SkBitmap bm; // make sure we don't assert on an empty install - success = bm.installPixels(info, NULL, 0); + success = bm.installPixels(info, nullptr, 0); REPORTER_ASSERT(reporter, success); // no pixels should be the same as setInfo() info = SkImageInfo::MakeN32Premul(10, 10); - success = bm.installPixels(info, NULL, 0); + success = bm.installPixels(info, nullptr, 0); REPORTER_ASSERT(reporter, success); } @@ -69,7 +69,7 @@ private: DEF_TEST(PixelRef_GenIDChange, r) { SkImageInfo info = SkImageInfo::MakeN32Premul(10, 10); - SkAutoTUnref pixelRef(SkMallocPixelRef::NewAllocate(info, 0, NULL)); + SkAutoTUnref pixelRef(SkMallocPixelRef::NewAllocate(info, 0, nullptr)); // Register a listener. int count = 0; @@ -94,9 +94,9 @@ DEF_TEST(PixelRef_GenIDChange, r) { pixelRef->notifyPixelsChanged(); REPORTER_ASSERT(r, 1 == count); - // Quick check that NULL is safe. + // Quick check that nullptr is safe. REPORTER_ASSERT(r, 0 != pixelRef->getGenerationID()); - pixelRef->addGenIDChangeListener(NULL); + pixelRef->addGenIDChangeListener(nullptr); pixelRef->notifyPixelsChanged(); test_install(r); -- cgit v1.2.3