Mark UUID::GetByteSize() const
authorStephane Sezer <sas@cd80.net>
Mon, 27 Nov 2017 21:16:37 +0000 (21:16 +0000)
committerStephane Sezer <sas@cd80.net>
Mon, 27 Nov 2017 21:16:37 +0000 (21:16 +0000)
Summary:
This method doesn't modify anything in the object it's called on so we
can mark it const to make it usable in a const context.

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D40517

llvm-svn: 319095

lldb/include/lldb/Utility/UUID.h
lldb/source/Utility/UUID.cpp

index 6313025..5e64e90 100644 (file)
@@ -46,7 +46,7 @@ public:
 
   const void *GetBytes() const;
 
-  size_t GetByteSize();
+  size_t GetByteSize() const;
 
   bool IsValid() const;
 
index edad98e..1b5d24a 100644 (file)
@@ -109,7 +109,7 @@ bool UUID::SetBytes(const void *uuid_bytes, uint32_t num_uuid_bytes) {
   return false;
 }
 
-size_t UUID::GetByteSize() { return m_num_uuid_bytes; }
+size_t UUID::GetByteSize() const { return m_num_uuid_bytes; }
 
 bool UUID::IsValid() const {
   return m_uuid[0] || m_uuid[1] || m_uuid[2] || m_uuid[3] || m_uuid[4] ||