[Lldb-commits] [PATCH] D40517: Mark UUID::GetByteSize() const

Stephane Sezer via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 27 12:58:11 PST 2017


sas created this revision.

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.


https://reviews.llvm.org/D40517

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


Index: source/Utility/UUID.cpp
===================================================================
--- source/Utility/UUID.cpp
+++ source/Utility/UUID.cpp
@@ -109,7 +109,7 @@
   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] ||
Index: include/lldb/Utility/UUID.h
===================================================================
--- include/lldb/Utility/UUID.h
+++ include/lldb/Utility/UUID.h
@@ -46,7 +46,7 @@
 
   const void *GetBytes() const;
 
-  size_t GetByteSize();
+  size_t GetByteSize() const;
 
   bool IsValid() const;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40517.124450.patch
Type: text/x-patch
Size: 731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171127/68e9bfeb/attachment.bin>


More information about the lldb-commits mailing list