зеркало из https://github.com/mozilla/gecko-dev.git
Bug 797666: Add unsigned cast in assertion within TiledLayerBuffer::Update(), to fix build warning. r=BenWa
This commit is contained in:
Родитель
e7b15a81a9
Коммит
17bc9ceac1
|
@ -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]);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче