Explicitly cast ints in SkSTArray.
The compiler can complain about these signed to unsigned conversions.
Explicitly cast them in initWithPreallocatedStorage to match the way
this is already done in init [0].
[0] 311b648013
"pack SkTArray"
Change-Id: I0f723094fd356f9c5971b35998c4ecd59c09332f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/536099
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
parent
432f28c149
commit
e54df3563d
@ -478,15 +478,15 @@ private:
|
||||
SkASSERT(count >= 0);
|
||||
SkASSERT(preallocCount > 0);
|
||||
SkASSERT(preallocStorage);
|
||||
fCount = count;
|
||||
fCount = SkToU32(count);
|
||||
fItemArray = nullptr;
|
||||
fReserved = false;
|
||||
if (count > preallocCount) {
|
||||
fAllocCount = std::max(count, kMinHeapAllocCount);
|
||||
fAllocCount = SkToU32(std::max(count, kMinHeapAllocCount));
|
||||
fItemArray = (T*)sk_malloc_throw(fAllocCount, sizeof(T));
|
||||
fOwnMemory = true;
|
||||
} else {
|
||||
fAllocCount = preallocCount;
|
||||
fAllocCount = SkToU32(preallocCount);
|
||||
fItemArray = (T*)preallocStorage;
|
||||
fOwnMemory = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user