mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
base: make Affinity::Space::location_of_index const
This commit is contained in:
committed by
Christian Helmuth
parent
774b1f4277
commit
9b544787bd
@@ -86,7 +86,7 @@ class Genode::Affinity
|
|||||||
* case, the x and y coordinates are wrapped by the bounds
|
* case, the x and y coordinates are wrapped by the bounds
|
||||||
* of the space.
|
* 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)
|
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);
|
return Location(index % _width, (index / _width) % _height, 1, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user