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
Родитель e7b15a81a9
Коммит 17bc9ceac1
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

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