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

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

Issue 2622363005: Migrate WTF::Vector::append() to ::push_back() in WTF::HexNumber (Closed)
Patch Set: compiles, ship to production 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..2f54e35949c8f86c4224a0c39aea04f96c686ef0 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,
Yuta Kitamura 2017/01/13 07:32:09 Is just specializing for Vector<LChar> sufficient?
+ Vector<LChar>& destination,
+ HexConversionMode mode) {
+ 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