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/SkVarAlloc.cpp

Issue 1845123002: Fix C4334 warning about 32-bit shift assigned to 64-bits (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | no next file » | 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 #include "SkVarAlloc.h" 8 #include "SkVarAlloc.h"
9 9
10 struct SkVarAlloc::Block { 10 struct SkVarAlloc::Block {
(...skipping 27 matching lines...) Expand all
38 while (b) { 38 while (b) {
39 Block* prev = b->prev; 39 Block* prev = b->prev;
40 sk_free(b); 40 sk_free(b);
41 b = prev; 41 b = prev;
42 } 42 }
43 } 43 }
44 44
45 void SkVarAlloc::makeSpace(size_t bytes) { 45 void SkVarAlloc::makeSpace(size_t bytes) {
46 SkASSERT(SkIsAlignPtr(bytes)); 46 SkASSERT(SkIsAlignPtr(bytes));
47 47
48 size_t alloc = 1<<fLgSize++; 48 size_t alloc = static_cast<size_t>(1)<<fLgSize++;
49 while (alloc < bytes + sizeof(Block)) { 49 while (alloc < bytes + sizeof(Block)) {
50 alloc *= 2; 50 alloc *= 2;
51 } 51 }
52 fBytesAllocated += alloc; 52 fBytesAllocated += alloc;
53 fBlock = Block::Alloc(fBlock, alloc); 53 fBlock = Block::Alloc(fBlock, alloc);
54 fByte = fBlock->data(); 54 fByte = fBlock->data();
55 fRemaining = alloc - sizeof(Block); 55 fRemaining = alloc - sizeof(Block);
56 } 56 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698