From 9b544787bd1f13db2e7cbf202fd36b7a5cc8ae01 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 20 Nov 2020 14:57:31 +0100 Subject: [PATCH] base: make Affinity::Space::location_of_index const --- repos/base/include/base/affinity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base/include/base/affinity.h b/repos/base/include/base/affinity.h index edaa01b999..36eeba1af6 100644 --- a/repos/base/include/base/affinity.h +++ b/repos/base/include/base/affinity.h @@ -86,7 +86,7 @@ class Genode::Affinity * case, the x and y coordinates are wrapped by the bounds * of the space. */ - inline Location location_of_index(int index); + inline Location location_of_index(int index) const; static Space from_xml(Xml_node const &node) { @@ -215,7 +215,7 @@ class Genode::Affinity }; -Genode::Affinity::Location Genode::Affinity::Space::location_of_index(int index) +Genode::Affinity::Location Genode::Affinity::Space::location_of_index(int index) const { return Location(index % _width, (index / _width) % _height, 1, 1); }