[Lldb-commits] [PATCH] D40519: Remove some duplicated code in UUID.cpp
Stephane Sezer via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 27 13:50:59 PST 2017
sas created this revision.
Formatting needs to be done only once. Ran check-lldb and nothing changes.
https://reviews.llvm.org/D40519
Files:
source/Utility/UUID.cpp
Index: source/Utility/UUID.cpp
===================================================================
--- source/Utility/UUID.cpp
+++ source/Utility/UUID.cpp
@@ -74,14 +74,8 @@
}
void UUID::Dump(Stream *s) const {
- const uint8_t *u = (const uint8_t *)GetBytes();
- s->Printf("%2.2X%2.2X%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X-%2.2X%2.2X%"
- "2.2X%2.2X%2.2X%2.2X",
- u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], u[9], u[10],
- u[11], u[12], u[13], u[14], u[15]);
- if (m_num_uuid_bytes == 20) {
- s->Printf("-%2.2X%2.2X%2.2X%2.2X", u[16], u[17], u[18], u[19]);
- }
+ auto str = GetAsString();
+ s->Printf("%s", str.c_str());
}
bool UUID::SetBytes(const void *uuid_bytes, uint32_t num_uuid_bytes) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40519.124463.patch
Type: text/x-patch
Size: 758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171127/0f51f851/attachment.bin>
More information about the lldb-commits
mailing list