Commit 5bd921ce authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

next13

parent 1c24bbcc
Pipeline #2309 failed with stage
in 1 minute and 9 seconds
......@@ -174,7 +174,8 @@ struct data_array
// accessor to the id part if Item
Identifier get_id(const T&);
T& get(Identifier id); // return item[id & 0xFFFF];
T& get(Identifier id); // return item[id & 0xFFFF];
const T& get(Identifier id) const; // return item[id & 0xFFFF];
/**
* @brief Get a T from an ID.
......@@ -370,7 +371,14 @@ template<typename T, typename Identifier>
T&
data_array<T, Identifier>::get(Identifier id)
{
return items[get_index(id)];
return items[get_index(id)].item;
}
template<typename T, typename Identifier>
const T&
data_array<T, Identifier>::get(Identifier id) const
{
return items[get_index(id)].item;
}
template<typename T, typename Identifier>
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment