Browse Source

AK: Make the Bitmap::size_in_bytes() member function public

It's annoying to calculate it when it's already a member function.
AnotherTest 4 năm trước cách đây
mục cha
commit
4d40864b9d
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      AK/Bitmap.h

+ 1 - 2
AK/Bitmap.h

@@ -82,6 +82,7 @@ public:
     }
     }
 
 
     size_t size() const { return m_size; }
     size_t size() const { return m_size; }
+    size_t size_in_bytes() const { return ceil_div(m_size, static_cast<size_t>(8)); }
     bool get(size_t index) const
     bool get(size_t index) const
     {
     {
         ASSERT(index < m_size);
         ASSERT(index < m_size);
@@ -523,8 +524,6 @@ public:
     static constexpr u32 max_size = 0xffffffff;
     static constexpr u32 max_size = 0xffffffff;
 
 
 private:
 private:
-    size_t size_in_bytes() const { return ceil_div(m_size, static_cast<size_t>(8)); }
-
     u8* m_data { nullptr };
     u8* m_data { nullptr };
     size_t m_size { 0 };
     size_t m_size { 0 };
     bool m_owned { false };
     bool m_owned { false };