[Lldb-commits] [PATCH] D40536: Simplify UUID constructors

Stephane Sezer via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 28 09:51:02 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL319191: Simplify UUID constructors (authored by sas).

Repository:
  rL LLVM

https://reviews.llvm.org/D40536

Files:
  lldb/trunk/source/Utility/UUID.cpp


Index: lldb/trunk/source/Utility/UUID.cpp
===================================================================
--- lldb/trunk/source/Utility/UUID.cpp
+++ lldb/trunk/source/Utility/UUID.cpp
@@ -21,11 +21,10 @@
 
 namespace lldb_private {
 
-UUID::UUID() : m_num_uuid_bytes(16) { ::memset(m_uuid, 0, sizeof(m_uuid)); }
+UUID::UUID() { Clear(); }
 
 UUID::UUID(const UUID &rhs) {
-  m_num_uuid_bytes = rhs.m_num_uuid_bytes;
-  ::memcpy(m_uuid, rhs.m_uuid, sizeof(m_uuid));
+  SetBytes(rhs.m_uuid, rhs.m_num_uuid_bytes);
 }
 
 UUID::UUID(const void *uuid_bytes, uint32_t num_uuid_bytes) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40536.124596.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171128/f2cdd36a/attachment.bin>


More information about the lldb-commits mailing list