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

Unified Diff: Source/platform/text/LocaleWin.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/text/DateTimeFormat.cpp ('k') | Source/platform/text/PlatformLocale.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/LocaleWin.cpp
diff --git a/Source/platform/text/LocaleWin.cpp b/Source/platform/text/LocaleWin.cpp
index c658d02094f3af74efd2151a28ef84ba28d1994f..e4e56bcbcb2229ff1d4b396d5190714bb94df89e 100644
--- a/Source/platform/text/LocaleWin.cpp
+++ b/Source/platform/text/LocaleWin.cpp
@@ -304,9 +304,9 @@ static String convertWindowsDateTimeFormat(const String& format)
if (count <= 2)
converted.append(format, symbolStart, count);
else if (count == 3)
- converted.append("EEE");
+ converted.appendLiteral("EEE");
else
- converted.append("EEEE");
+ converted.appendLiteral("EEEE");
} else if (ch == 'g') {
if (count == 1) {
converted.append('G');
@@ -452,7 +452,7 @@ String LocaleWin::shortTimeFormat()
format = getLocaleInfoString(LOCALE_STIMEFORMAT);
StringBuilder builder;
builder.append(getLocaleInfoString(LOCALE_STIME));
- builder.append("ss");
+ builder.appendLiteral("ss");
size_t pos = format.reverseFind(builder.toString());
if (pos != kNotFound)
format.remove(pos, builder.length());
« no previous file with comments | « Source/platform/text/DateTimeFormat.cpp ('k') | Source/platform/text/PlatformLocale.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698