mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
xml_node: change with_sub_node signature
The `with_sub_node` method is renamed to `with_optional_sub_node` to better reflect that the non-existence of a sub node with the desired type is ignored. At the same time, the new `with_sub_node` now takes a second functor that is called when no sub node of the desired type exists. genodelabs/genode#4600
This commit is contained in:
committed by
Norman Feske
parent
f0e9881c7e
commit
7d143087c9
@@ -133,7 +133,7 @@ struct Main
|
||||
|
||||
_uplink.construct(_env, _heap);
|
||||
|
||||
_config_rom.xml().with_sub_node("report", [&] (Xml_node const &xml) {
|
||||
_config_rom.xml().with_optional_sub_node("report", [&] (Xml_node const &xml) {
|
||||
bool const report_mac_address =
|
||||
xml.attribute_value("mac_address", false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user