From c455e9266efe77194a9e1d189047bfd28d58a46d Mon Sep 17 00:00:00 2001 From: Michael Mueller Date: Tue, 30 Jan 2024 17:53:41 +0100 Subject: [PATCH] base: Added operatiors for comparing affinities. --- repos/base/include/base/affinity.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/repos/base/include/base/affinity.h b/repos/base/include/base/affinity.h index 7421d1d074..2d45725ba2 100644 --- a/repos/base/include/base/affinity.h +++ b/repos/base/include/base/affinity.h @@ -167,6 +167,13 @@ class Genode::Affinity node.attribute_value("height", default_height)); } + bool operator==(Location const &rhs) { + return this->_xpos == rhs._xpos && this->_ypos == rhs._ypos && this->height() == rhs.height() && this->width() == rhs.width(); + } + + bool operator!=(Location const &rhs) { + return !(*this == rhs); + } }; private: