mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
os: add equality operators to 'Area'
This commit is contained in:
@@ -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; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user