[Lldb-commits] [PATCH] D40537: Simplify UUID::IsValid()

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 28 10:06:06 PST 2017

clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

A better solution would be to initialize UUID::m_num_uuid_bytes with zero and only set it to a valid value if we set bytes into it. Then UUID::IsValid() becomes easy:

  bool UUID::IsValid() const { return m_num_uuid_bytes > 0; }

This would allows us to actually have a UUID value that is valid and all zeroes. A few comments would need to be fixed as it currently assumes length is 16 or 20.


More information about the lldb-commits mailing list