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

Unified Diff: third_party/WebKit/Source/platform/blob/BlobData.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/blob/BlobData.cpp
diff --git a/third_party/WebKit/Source/platform/blob/BlobData.cpp b/third_party/WebKit/Source/platform/blob/BlobData.cpp
index 7898a46410f0b438bb84ee5fdba736f895b2d227..b854db90c5e4491b04fbca74294d5a4d7cfb963a 100644
--- a/third_party/WebKit/Source/platform/blob/BlobData.cpp
+++ b/third_party/WebKit/Source/platform/blob/BlobData.cpp
@@ -140,7 +140,7 @@ void BlobData::appendText(const String& text,
RefPtr<RawData> data = nullptr;
Vector<char>* buffer;
if (canConsolidateData(text.length())) {
- buffer = m_items.last().data->mutableData();
+ buffer = m_items.back().data->mutableData();
} else {
data = RawData::create();
buffer = data->mutableData();
@@ -160,7 +160,7 @@ void BlobData::appendBytes(const void* bytes, size_t length) {
CHECK_EQ(m_fileComposition, FileCompositionStatus::NO_UNKNOWN_SIZE_FILES)
<< "Blobs with a unknown-size file cannot have other items.";
if (canConsolidateData(length)) {
- m_items.last().data->mutableData()->append(static_cast<const char*>(bytes),
+ m_items.back().data->mutableData()->append(static_cast<const char*>(bytes),
length);
return;
}
@@ -198,7 +198,7 @@ long long BlobData::length() const {
bool BlobData::canConsolidateData(size_t length) {
if (m_items.isEmpty())
return false;
- BlobDataItem& lastItem = m_items.last();
+ BlobDataItem& lastItem = m_items.back();
if (lastItem.type != BlobDataItem::Data)
return false;
if (lastItem.data->length() + length > kMaxConsolidatedItemSizeInBytes)
« no previous file with comments | « third_party/WebKit/Source/platform/SharedBuffer.cpp ('k') | third_party/WebKit/Source/platform/fonts/GlyphBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698