[Lldb-commits] [lldb] r319095 - Mark UUID::GetByteSize() const

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 27 13:16:37 PST 2017


Author: sas
Date: Mon Nov 27 13:16:37 2017
New Revision: 319095

URL: http://llvm.org/viewvc/llvm-project?rev=319095&view=rev
Log:
Mark UUID::GetByteSize() const

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

Modified:
    lldb/trunk/include/lldb/Utility/UUID.h
    lldb/trunk/source/Utility/UUID.cpp

Modified: lldb/trunk/include/lldb/Utility/UUID.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/UUID.h?rev=319095&r1=319094&r2=319095&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/UUID.h (original)
+++ lldb/trunk/include/lldb/Utility/UUID.h Mon Nov 27 13:16:37 2017
@@ -46,7 +46,7 @@ public:
 
   const void *GetBytes() const;
 
-  size_t GetByteSize();
+  size_t GetByteSize() const;
 
   bool IsValid() const;
 

Modified: lldb/trunk/source/Utility/UUID.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/UUID.cpp?rev=319095&r1=319094&r2=319095&view=diff
==============================================================================
--- lldb/trunk/source/Utility/UUID.cpp (original)
+++ lldb/trunk/source/Utility/UUID.cpp Mon Nov 27 13:16:37 2017
@@ -109,7 +109,7 @@ bool UUID::SetBytes(const void *uuid_byt
   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] ||




More information about the lldb-commits mailing list