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

Unified Diff: third_party/WebKit/Source/platform/text/QuotedPrintable.cpp

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 years, 11 months 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/text/QuotedPrintable.cpp
diff --git a/third_party/WebKit/Source/platform/text/QuotedPrintable.cpp b/third_party/WebKit/Source/platform/text/QuotedPrintable.cpp
index 6189b29c6aa09767688cbe3741c69eef4b5f21d6..fceefd155449e492dc2c1e6ce59963daefd4f77d 100644
--- a/third_party/WebKit/Source/platform/text/QuotedPrintable.cpp
+++ b/third_party/WebKit/Source/platform/text/QuotedPrintable.cpp
@@ -103,19 +103,19 @@ void quotedPrintableEncode(const char* input,
// Insert a soft line break if necessary.
if (currentLineLength + lengthOfEncodedCharacter > maximumLineLength) {
- out.append('=');
+ out.push_back('=');
out.append(crlfLineEnding, strlen(crlfLineEnding));
currentLineLength = 0;
}
// Finally, insert the actual character(s).
if (requiresEncoding) {
- out.append('=');
- out.append(upperNibbleToASCIIHexDigit(currentCharacter));
- out.append(lowerNibbleToASCIIHexDigit(currentCharacter));
+ out.push_back('=');
+ out.push_back(upperNibbleToASCIIHexDigit(currentCharacter));
+ out.push_back(lowerNibbleToASCIIHexDigit(currentCharacter));
currentLineLength += 3;
} else {
- out.append(currentCharacter);
+ out.push_back(currentCharacter);
currentLineLength++;
}
}
@@ -135,13 +135,13 @@ void quotedPrintableDecode(const char* data,
for (size_t i = 0; i < dataLength; ++i) {
char currentCharacter = data[i];
if (currentCharacter != '=') {
- out.append(currentCharacter);
+ out.push_back(currentCharacter);
continue;
}
// We are dealing with a '=xx' sequence.
if (dataLength - i < 3) {
// Unfinished = sequence, append as is.
- out.append(currentCharacter);
+ out.push_back(currentCharacter);
continue;
}
char upperCharacter = data[++i];
@@ -152,12 +152,12 @@ void quotedPrintableDecode(const char* data,
if (!isASCIIHexDigit(upperCharacter) || !isASCIIHexDigit(lowerCharacter)) {
// Invalid sequence, = followed by non hex digits, just insert the
// characters as is.
- out.append('=');
- out.append(upperCharacter);
- out.append(lowerCharacter);
+ out.push_back('=');
+ out.push_back(upperCharacter);
+ out.push_back(lowerCharacter);
continue;
}
- out.append(
+ out.push_back(
static_cast<char>(toASCIIHexValue(upperCharacter, lowerCharacter)));
}
}

Powered by Google App Engine
This is Rietveld 408576698