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

Unified Diff: Source/platform/UUID.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/PODRedBlackTree.h ('k') | Source/platform/animation/TimingFunction.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/UUID.cpp
diff --git a/Source/platform/UUID.cpp b/Source/platform/UUID.cpp
index f732687e29fd359eb11b042dc9c3fe8394ca5f6c..80287219e88339892fc9a50905d578d87f2bb5ea 100644
--- a/Source/platform/UUID.cpp
+++ b/Source/platform/UUID.cpp
@@ -46,14 +46,14 @@ String createCanonicalUUIDString()
StringBuilder builder;
builder.reserveCapacity(36);
appendUnsignedAsHexFixedSize(randomData[0], builder, 8, Lowercase);
- builder.append("-");
+ builder.append('-');
appendUnsignedAsHexFixedSize(randomData[1] >> 16, builder, 4, Lowercase);
- builder.append("-4");
+ builder.appendLiteral("-4");
appendUnsignedAsHexFixedSize(randomData[1] & 0x00000fff, builder, 3, Lowercase);
- builder.append("-");
+ builder.append('-');
appendUnsignedAsHexFixedSize((randomData[2] >> 30) | 0x8, builder, 1, Lowercase);
appendUnsignedAsHexFixedSize((randomData[2] >> 16) & 0x00000fff, builder, 3, Lowercase);
- builder.append("-");
+ builder.append('-');
appendUnsignedAsHexFixedSize(randomData[2] & 0x0000ffff, builder, 4, Lowercase);
appendUnsignedAsHexFixedSize(randomData[3], builder, 8, Lowercase);
return builder.toString();
« no previous file with comments | « Source/platform/PODRedBlackTree.h ('k') | Source/platform/animation/TimingFunction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698