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

Unified Diff: third_party/WebKit/Source/wtf/HexNumber.h

Issue 2622363005: Migrate WTF::Vector::append() to ::push_back() in WTF::HexNumber (Closed)
Patch Set: jsbell's variation 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/HexNumber.h
diff --git a/third_party/WebKit/Source/wtf/HexNumber.h b/third_party/WebKit/Source/wtf/HexNumber.h
index 6956430bfd413474530f8fe4fd4f764f3f09d2c4..47816f8b8af3ab2444da99953b6ac5c822f1a9af 100644
--- a/third_party/WebKit/Source/wtf/HexNumber.h
+++ b/third_party/WebKit/Source/wtf/HexNumber.h
@@ -45,6 +45,15 @@ inline void appendByteAsHex(unsigned char byte,
destination.append(hexDigits[byte & 0xF]);
}
+template <>
+inline void appendByteAsHex<Vector<LChar>>(unsigned char byte,
+ Vector<LChar>& destination,
+ HexConversionMode mode = Uppercase) {
jsbell 2017/01/12 23:35:26 This should be just `HexConversionMode mode` (i.e.
+ const LChar* hexDigits = Internal::hexDigitsForMode(mode);
+ destination.push_back(hexDigits[byte >> 4]);
+ destination.push_back(hexDigits[byte & 0xF]);
+}
+
template <typename T>
inline void appendUnsignedAsHex(unsigned number,
T& destination,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698