1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-07 21:17:07 +09:00

AK: Define operator== for BitmapView

This commit is contained in:
Aliaksandr Kalenik 2025-01-04 17:36:54 +03:00 committed by Andreas Kling
parent e465e922bd
commit ae9257bf3b
Notes: github-actions[bot] 2025-01-04 19:33:38 +00:00

View file

@ -362,6 +362,17 @@ public:
static constexpr size_t max_size = 0xffffffff;
[[nodiscard]] bool operator==(BitmapView const& other) const
{
if (size() != other.size())
return false;
for (size_t i = 0; i < size_in_bytes(); ++i) {
if (m_data[i] != other.m_data[i])
return false;
}
return true;
}
protected:
u8* m_data { nullptr };
size_t m_size { 0 };