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

Unified Diff: Source/platform/text/PlatformLocale.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/LocaleWin.cpp ('k') | Source/platform/weborigin/SchemeRegistry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/text/PlatformLocale.cpp
diff --git a/Source/platform/text/PlatformLocale.cpp b/Source/platform/text/PlatformLocale.cpp
index 73cb6e19c52594957b24fc3d8f78e7dc76add0ff..79991ced8991997c2314e1c712930aaa6b0e1169 100644
--- a/Source/platform/text/PlatformLocale.cpp
+++ b/Source/platform/text/PlatformLocale.cpp
@@ -82,7 +82,7 @@ String DateTimeStringBuilder::zeroPadString(const String& string, size_t width)
StringBuilder zeroPaddedStringBuilder;
zeroPaddedStringBuilder.reserveCapacity(width);
for (size_t i = string.length(); i < width; ++i)
- zeroPaddedStringBuilder.append("0");
+ zeroPaddedStringBuilder.append('0');
zeroPaddedStringBuilder.append(string);
return zeroPaddedStringBuilder.toString();
}
@@ -364,7 +364,7 @@ String Locale::convertFromLocalizedNumber(const String& localized)
StringBuilder builder;
builder.reserveCapacity(input.length());
if (isNegative)
- builder.append("-");
+ builder.append('-');
for (unsigned i = startIndex; i < endIndex;) {
unsigned symbolIndex = matchedDecimalSymbolIndex(input, i);
if (symbolIndex >= DecimalSymbolsSize)
« no previous file with comments | « Source/platform/text/LocaleWin.cpp ('k') | Source/platform/weborigin/SchemeRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698