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

Side by Side Diff: src/core/SkWriter32.cpp

Issue 143223005: Fix broken debug build (Closed) Base URL: https://skia.googlesource.com/skia.git@no_external_test
Patch Set: Remove invalid private implementation detail tests Created 6 years, 10 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 | « no previous file | tests/Writer32Test.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 "SkReader32.h" 8 #include "SkReader32.h"
9 #include "SkString.h" 9 #include "SkString.h"
10 #include "SkWriter32.h" 10 #include "SkWriter32.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 fData = fInternal.begin(); 74 fData = fInternal.begin();
75 if (wasExternal) { 75 if (wasExternal) {
76 // we were external, so copy in the data 76 // we were external, so copy in the data
77 memcpy(fData, fExternal, fUsed); 77 memcpy(fData, fExternal, fUsed);
78 } 78 }
79 // Find out the size the buffer grew to, it may be more than we asked for. 79 // Find out the size the buffer grew to, it may be more than we asked for.
80 fCapacity = fInternal.reserved(); 80 fCapacity = fInternal.reserved();
81 // Expand the array so all reserved space is "used", we maintain the 81 // Expand the array so all reserved space is "used", we maintain the
82 // amount we have written manually outside the array 82 // amount we have written manually outside the array
83 fInternal.setCount(fCapacity); 83 fInternal.setCount(fCapacity);
84 SkASSERT(fInternal.count() == fCapacity); 84 SkASSERT(fInternal.count() == (int)fCapacity);
85 SkASSERT(fInternal.reserved() == fCapacity); 85 SkASSERT(fInternal.reserved() == (int)fCapacity);
86 } 86 }
OLDNEW
« no previous file with comments | « no previous file | tests/Writer32Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698