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

Unified Diff: Source/platform/text/DateTimeFormat.cpp

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « Source/platform/network/ProxyServer.cpp ('k') | Source/platform/text/LocaleWin.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/DateTimeFormat.cpp
diff --git a/Source/platform/text/DateTimeFormat.cpp b/Source/platform/text/DateTimeFormat.cpp
index 7ea210188fefd4656ca036b62117273e487f2147..1af63ea10f04422d43ca485b6b9a430ef9994e0f 100644
--- a/Source/platform/text/DateTimeFormat.cpp
+++ b/Source/platform/text/DateTimeFormat.cpp
@@ -256,21 +256,21 @@ void DateTimeFormat::quoteAndAppendLiteral(const String& literal, StringBuilder&
}
if (literal.find('\'') == kNotFound) {
- buffer.append("'");
+ buffer.append('\'');
buffer.append(literal);
- buffer.append("'");
+ buffer.append('\'');
return;
}
for (unsigned i = 0; i < literal.length(); ++i) {
if (literal[i] == '\'') {
- buffer.append("''");
+ buffer.appendLiteral("''");
} else {
String escaped = literal.substring(i);
escaped.replace("'", "''");
- buffer.append("'");
+ buffer.append('\'');
buffer.append(escaped);
- buffer.append("'");
+ buffer.append('\'');
return;
}
}
« no previous file with comments | « Source/platform/network/ProxyServer.cpp ('k') | Source/platform/text/LocaleWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698