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

Side by Side Diff: src/core/SkColorTable.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 | « src/core/SkColorFilter.cpp ('k') | src/core/SkComposeShader.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 /* 2 /*
3 * Copyright 2009 The Android Open Source Project 3 * Copyright 2009 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkColorTable.h" 10 #include "SkColorTable.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 fCount = buffer.getArrayCount(); 71 fCount = buffer.getArrayCount();
72 size_t allocSize = fCount * sizeof(SkPMColor); 72 size_t allocSize = fCount * sizeof(SkPMColor);
73 SkDEBUGCODE(bool success = false;) 73 SkDEBUGCODE(bool success = false;)
74 if (buffer.validateAvailable(allocSize)) { 74 if (buffer.validateAvailable(allocSize)) {
75 fColors = (SkPMColor*)sk_malloc_throw(allocSize); 75 fColors = (SkPMColor*)sk_malloc_throw(allocSize);
76 SkDEBUGCODE(success =) buffer.readColorArray(fColors, fCount); 76 SkDEBUGCODE(success =) buffer.readColorArray(fColors, fCount);
77 } else { 77 } else {
78 fCount = 0; 78 fCount = 0;
79 fColors = NULL; 79 fColors = nullptr;
80 } 80 }
81 #ifdef SK_DEBUG 81 #ifdef SK_DEBUG
82 SkASSERT((unsigned)fCount <= 256); 82 SkASSERT((unsigned)fCount <= 256);
83 SkASSERT(success); 83 SkASSERT(success);
84 #endif 84 #endif
85 } 85 }
86 86
87 void SkColorTable::writeToBuffer(SkWriteBuffer& buffer) const { 87 void SkColorTable::writeToBuffer(SkWriteBuffer& buffer) const {
88 buffer.writeColorArray(fColors, fCount); 88 buffer.writeColorArray(fColors, fCount);
89 } 89 }
OLDNEW
« no previous file with comments | « src/core/SkColorFilter.cpp ('k') | src/core/SkComposeShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698