mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
os: add equality operators to 'Area'
This commit is contained in:
parent
9d7270b174
commit
0fab869bcc
@ -85,6 +85,16 @@ class Genode::Area
|
||||
bool valid() const { return _w > 0 && _h > 0; }
|
||||
|
||||
size_t count() const { return _w*_h; }
|
||||
|
||||
/**
|
||||
* Operator for testing non-equality of two areas
|
||||
*/
|
||||
bool operator != (Area const &a) const { return a.w() != _w || a.h() != _h; }
|
||||
|
||||
/**
|
||||
* Operator for testing equality of two areas
|
||||
*/
|
||||
bool operator == (Area const &a) const { return a.w() == _w && a.h() == _h; }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user