Bug 797666: Add unsigned cast in assertion within TiledLayerBuffer::Update(), to fix build warning. r=BenWa

This commit is contained in:
Daniel Holbert 2012-10-03 22:31:59 -07:00
parent 58bc1b7fb5
commit b99559ce8f

View File

@ -365,7 +365,10 @@ TiledLayerBuffer<Derived, Tile>::Update(const nsIntRegion& aNewValidRegion,
int tileX = floor_div(x - newBufferOrigin.x, GetTileLength());
int tileY = floor_div(y - newBufferOrigin.y, GetTileLength());
int index = tileX * mRetainedHeight + tileY;
NS_ABORT_IF_FALSE(index >= 0 && index < newRetainedTiles.Length(), "index out of range");
NS_ABORT_IF_FALSE(index >= 0 &&
static_cast<unsigned>(index) < newRetainedTiles.Length(),
"index out of range");
Tile newTile = newRetainedTiles[index];
while (IsPlaceholder(newTile) && oldRetainedTiles.Length() > 0) {
AsDerived().SwapTiles(newTile, oldRetainedTiles[oldRetainedTiles.Length()-1]);