mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 23:28:29 +00:00
base: Add const qualifiers to 'util/list.h'
This patch adds support for iterating through a const list. This allows users of lists to be more rigid with regard to constness. Furthermore, the patch adds the function 'List::insert_at' for inserting an element at a specified position. By adding this function, we can remove code duplication in nitpicker.
This commit is contained in:
@ -28,7 +28,7 @@ namespace File_system {
|
||||
|
||||
bool has_sub_node_unsynchronized(char const *name) const
|
||||
{
|
||||
Node *sub_node = _entries.first();
|
||||
Node const *sub_node = _entries.first();
|
||||
for (; sub_node; sub_node = sub_node->next())
|
||||
if (strcmp(sub_node->name(), name) == 0)
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user