base: avoid warnings in list.h

clang:

error: member 'Element' found in multiple base classes of different types

Issue #3022
This commit is contained in:
Alexander Boettcher 2018-10-25 12:25:00 +02:00 committed by Christian Helmuth
parent fc0dbc3f70
commit f7364d8463

View File

@ -76,11 +76,11 @@ class Genode::List
{ {
/* insert at beginning of the list */ /* insert at beginning of the list */
if (at == 0) { if (at == 0) {
le->Element::_next = _first; le->List::Element::_next = _first;
_first = const_cast<LT *>(le); _first = const_cast<LT *>(le);
} else { } else {
le->Element::_next = at->Element::_next; le->List::Element::_next = at->List::Element::_next;
at->Element::_next = const_cast<LT *>(le); at->List::Element::_next = const_cast<LT *>(le);
} }
} }
@ -93,7 +93,7 @@ class Genode::List
/* if specified element is the first of the list */ /* if specified element is the first of the list */
if (le == _first) { if (le == _first) {
_first = le->Element::_next; _first = le->List::Element::_next;
} else { } else {
@ -106,10 +106,10 @@ class Genode::List
if (!e->_next) return; if (!e->_next) return;
/* e->_next is the element to remove, skip it in list */ /* e->_next is the element to remove, skip it in list */
e->Element::_next = e->Element::_next->Element::_next; e->List::Element::_next = e->List::Element::_next->List::Element::_next;
} }
le->Element::_next = 0; le->List::Element::_next = 0;
} }
}; };