mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
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:
parent
f55ce4a38c
commit
f93ddb39f5
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user