Bug 1317637 - Converts for(...; ...; ...) loops to use the new range-based loops in C++11 in gfx/. r=jrmuizel

MozReview-Commit-ID: Dd6426wCbMg

--HG--
extra : rebase_source : 9e849faba30642b273bc5a0e0a74355ba160173e
This commit is contained in:
Andi-Bogdan Postelnicu 2016-11-15 10:55:49 +02:00
parent f55ce4a38c
commit f93ddb39f5
3 changed files with 5 additions and 6 deletions

View File

@ -193,8 +193,7 @@ VerifyRGBXCorners(uint8_t* aData, const IntSize &aSize, const int32_t aStride, S
const int middle = aStride * middleRowHeight + middleRowWidth;
const int offsets[] = { topLeft, topRight, bottomRight, bottomLeft, middle };
for (size_t i = 0; i < MOZ_ARRAY_LENGTH(offsets); i++) {
int offset = offsets[i];
for (int offset : offsets) {
if (aData[offset + kARGBAlphaOffset] != 0xFF) {
int row = offset / aStride;
int column = (offset % aStride) / pixelSize;

View File

@ -430,8 +430,8 @@ PersistentBufferProviderShared::Destroy()
mSnapshot = nullptr;
mDrawTarget = nullptr;
for (uint32_t i = 0; i < mTextures.length(); ++i) {
TextureClient* texture = mTextures[i];
for (auto& mTexture : mTextures) {
TextureClient* texture = mTexture;
if (texture && texture->IsLocked()) {
MOZ_ASSERT(false);
texture->Unlock();

View File

@ -289,8 +289,8 @@ void CrashStatsLogForwarder::UpdateCrashReport()
break;
}
for (LoggingRecord::iterator it = mBuffer.begin(); it != mBuffer.end(); ++it) {
message << logAnnotation << Get<0>(*it) << "]" << Get<1>(*it) << " (t=" << Get<2>(*it) << ") ";
for (auto& it : mBuffer) {
message << logAnnotation << Get<0>(it) << "]" << Get<1>(it) << " (t=" << Get<2>(it) << ") ";
}
#ifdef MOZ_CRASHREPORTER