diff --git a/repos/base/include/base/affinity.h b/repos/base/include/base/affinity.h index 6025ba8181..821e72349e 100644 --- a/repos/base/include/base/affinity.h +++ b/repos/base/include/base/affinity.h @@ -166,6 +166,15 @@ class Genode::Affinity node.attribute_value("height", default_height)); } + template + void for_each(const FUNC &fn) { + for (unsigned y = _ypos; y < _ypos + height(); y++) { + for (unsigned x = _xpos; x < _xpos+_width; x++) { + fn(Genode::Affinity::Location(x, y, _width, _height)); + } + } + } + }; private: