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

Side by Side Diff: tests/RecordTestUtils.h

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/RecordReplaceDrawTest.cpp ('k') | tests/RecordingXfermodeTest.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 2015 Google Inc. 2 * Copyright 2015 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 #ifndef RecordTestUtils_DEFINED 8 #ifndef RecordTestUtils_DEFINED
9 #define RecordTestUtils_DEFINED 9 #define RecordTestUtils_DEFINED
10 10
11 #include "SkRecord.h" 11 #include "SkRecord.h"
12 #include "SkRecords.h" 12 #include "SkRecords.h"
13 13
14 // If the command we're reading is a U, set ptr to it, otherwise set it to NULL. 14 // If the command we're reading is a U, set ptr to it, otherwise set it to nullp tr.
15 template <typename U> 15 template <typename U>
16 struct ReadAs { 16 struct ReadAs {
17 ReadAs() : ptr(NULL), type(SkRecords::Type(~0)) {} 17 ReadAs() : ptr(nullptr), type(SkRecords::Type(~0)) {}
18 18
19 const U* ptr; 19 const U* ptr;
20 SkRecords::Type type; 20 SkRecords::Type type;
21 21
22 void operator()(const U& r) { ptr = &r; type = U::kType; } 22 void operator()(const U& r) { ptr = &r; type = U::kType; }
23 23
24 template <typename T> 24 template <typename T>
25 void operator()(const T&) { type = U::kType; } 25 void operator()(const T&) { type = U::kType; }
26 }; 26 };
27 27
(...skipping 25 matching lines...) Expand all
53 MatchType<DrawT> matcher; 53 MatchType<DrawT> matcher;
54 for (int i = 0; i < record.count(); i++) { 54 for (int i = 0; i < record.count(); i++) {
55 if (record.visit<int>(i, matcher)) { 55 if (record.visit<int>(i, matcher)) {
56 return i; 56 return i;
57 } 57 }
58 } 58 }
59 return -1; 59 return -1;
60 } 60 }
61 61
62 #endif//RecordTestUtils_DEFINED 62 #endif//RecordTestUtils_DEFINED
OLDNEW
« no previous file with comments | « tests/RecordReplaceDrawTest.cpp ('k') | tests/RecordingXfermodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698