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:
Ankur Mittal 2018-05-03 14:02:56 -07:00 committed by Skia Commit-Bot
parent 5226b777ed
commit c57354418b

View File

@ -271,7 +271,7 @@ private:
}
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
// uint16_t. Draw what we've got so far and reset.
this->draw(target, gp.get(), pipeline, vertexCount, vertexStride, vertices,