Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1355)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.cpp

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.cpp b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.cpp
index c475109c06c3599e2adf3819fff771df81ea9adc..df7b78818b7837bc84f0e04892192b99e404fda9 100644
--- a/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.cpp
@@ -446,14 +446,14 @@ bool GIFImageReader::parseData(size_t dataPosition,
ASSERT(!m_frames.isEmpty());
// m_bytesToConsume is the current component size because it hasn't been
// updated.
- m_frames.last()->addLzwBlock(currentComponentPosition,
+ m_frames.back()->addLzwBlock(currentComponentPosition,
m_bytesToConsume);
GETN(1, GIFSubBlock);
break;
case GIFLZWStart: {
ASSERT(!m_frames.isEmpty());
- m_frames.last()->setDataSize(static_cast<unsigned char>(
+ m_frames.back()->setDataSize(static_cast<unsigned char>(
reader.getOneByte(currentComponentPosition)));
GETN(1, GIFSubBlock);
break;
@@ -602,7 +602,7 @@ bool GIFImageReader::parseData(size_t dataPosition,
currentComponentPosition, 4, readBuffer));
addFrameIfNecessary();
- GIFFrameContext* currentFrame = m_frames.last().get();
+ GIFFrameContext* currentFrame = m_frames.back().get();
if (*currentComponent & 0x1)
currentFrame->setTransparentPixel(currentComponent[3]);
@@ -782,7 +782,7 @@ bool GIFImageReader::parseData(size_t dataPosition,
}
addFrameIfNecessary();
- GIFFrameContext* currentFrame = m_frames.last().get();
+ GIFFrameContext* currentFrame = m_frames.back().get();
currentFrame->setHeaderDefined();
@@ -825,7 +825,7 @@ bool GIFImageReader::parseData(size_t dataPosition,
case GIFImageColormap: {
ASSERT(!m_frames.isEmpty());
- m_frames.last()->localColorMap().setDefined();
+ m_frames.back()->localColorMap().setDefined();
GETN(1, GIFLZWStart);
break;
}
@@ -840,7 +840,7 @@ bool GIFImageReader::parseData(size_t dataPosition,
ASSERT(!m_frames.isEmpty());
// Note that some broken GIF files do not have enough LZW blocks to
// fully decode all rows; we treat this case as "frame complete".
- m_frames.last()->setComplete();
+ m_frames.back()->setComplete();
GETN(1, GIFImageStart);
}
break;
@@ -868,7 +868,7 @@ void GIFImageReader::setRemainingBytes(size_t remainingBytes) {
}
void GIFImageReader::addFrameIfNecessary() {
- if (m_frames.isEmpty() || m_frames.last()->isComplete())
+ if (m_frames.isEmpty() || m_frames.back()->isComplete())
m_frames.append(wrapUnique(new GIFFrameContext(m_frames.size())));
}

Powered by Google App Engine
This is Rietveld 408576698