mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
AK: Define operator== for BitmapView
This commit is contained in:
parent
e465e922bd
commit
ae9257bf3b
Notes:
github-actions[bot]
2025-01-04 19:33:38 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: ae9257bf3b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3121
1 changed files with 11 additions and 0 deletions
|
@ -362,6 +362,17 @@ public:
|
||||||
|
|
||||||
static constexpr size_t max_size = 0xffffffff;
|
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:
|
protected:
|
||||||
u8* m_data { nullptr };
|
u8* m_data { nullptr };
|
||||||
size_t m_size { 0 };
|
size_t m_size { 0 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue