Fix skia compilation error
UINT16_MAX is unsigned int. cast it to int before using it with other int variables Change-Id: I77d88a8d3011424a05ab54201c815ce38f9854ca Reviewed-on: https://skia-review.googlesource.com/125805 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
5226b777ed
commit
c57354418b
@ -271,7 +271,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int currentIndices = tess.numIndices();
|
int currentIndices = tess.numIndices();
|
||||||
if (indexCount + currentIndices > UINT16_MAX) {
|
if (indexCount + currentIndices > static_cast<int>(UINT16_MAX)) {
|
||||||
// if we added the current instance, we would overflow the indices we can store in a
|
// if we added the current instance, we would overflow the indices we can store in a
|
||||||
// uint16_t. Draw what we've got so far and reset.
|
// uint16_t. Draw what we've got so far and reset.
|
||||||
this->draw(target, gp.get(), pipeline, vertexCount, vertexStride, vertices,
|
this->draw(target, gp.get(), pipeline, vertexCount, vertexStride, vertices,
|
||||||
|
Loading…
Reference in New Issue
Block a user