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

Side by Side Diff: tests/GrMemoryPoolTest.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, 3 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 unified diff | Download patch
« no previous file with comments | « tests/GrGLSLPrettyPrintTest.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Test.h" 8 #include "Test.h"
9 // This is a GPU-backend specific test 9 // This is a GPU-backend specific test
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 static A* Create(SkRandom* r); 46 static A* Create(SkRandom* r);
47 47
48 static void SetAllocator(size_t preallocSize, size_t minAllocSize) { 48 static void SetAllocator(size_t preallocSize, size_t minAllocSize) {
49 GrMemoryPool* pool = new GrMemoryPool(preallocSize, minAllocSize); 49 GrMemoryPool* pool = new GrMemoryPool(preallocSize, minAllocSize);
50 gPool.reset(pool); 50 gPool.reset(pool);
51 } 51 }
52 52
53 static void ResetAllocator() { 53 static void ResetAllocator() {
54 gPool.reset(NULL); 54 gPool.reset(nullptr);
55 } 55 }
56 56
57 private: 57 private:
58 static SkAutoTDelete<GrMemoryPool> gPool; 58 static SkAutoTDelete<GrMemoryPool> gPool;
59 char fChar; 59 char fChar;
60 }; 60 };
61 61
62 SkAutoTDelete<GrMemoryPool> A::gPool; 62 SkAutoTDelete<GrMemoryPool> A::gPool;
63 63
64 class B : public A { 64 class B : public A {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 case 1: 157 case 1:
158 return new B; 158 return new B;
159 case 2: 159 case 2:
160 return new C; 160 return new C;
161 case 3: 161 case 3:
162 return new D; 162 return new D;
163 case 4: 163 case 4:
164 return new E; 164 return new E;
165 default: 165 default:
166 // suppress warning 166 // suppress warning
167 return NULL; 167 return nullptr;
168 } 168 }
169 } 169 }
170 170
171 struct Rec { 171 struct Rec {
172 A* fInstance; 172 A* fInstance;
173 int fValue; 173 int fValue;
174 }; 174 };
175 175
176 DEF_TEST(GrMemoryPool, reporter) { 176 DEF_TEST(GrMemoryPool, reporter) {
177 // prealloc and min alloc sizes for the pool 177 // prealloc and min alloc sizes for the pool
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 for (int i = 0; i < instanceRecs.count(); ++i) { 221 for (int i = 0; i < instanceRecs.count(); ++i) {
222 Rec& rec = instanceRecs[i]; 222 Rec& rec = instanceRecs[i];
223 REPORTER_ASSERT(reporter, rec.fInstance->checkValues(rec.fValue) ); 223 REPORTER_ASSERT(reporter, rec.fInstance->checkValues(rec.fValue) );
224 delete rec.fInstance; 224 delete rec.fInstance;
225 } 225 }
226 } 226 }
227 } 227 }
228 } 228 }
229 229
230 #endif 230 #endif
OLDNEW
« no previous file with comments | « tests/GrGLSLPrettyPrintTest.cpp ('k') | tests/GrPorterDuffTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698