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:
Johannes Schlatow
2022-09-08 10:17:26 +02:00
committed by Norman Feske
parent f0e9881c7e
commit 7d143087c9
47 changed files with 220 additions and 205 deletions

View File

@ -49,7 +49,7 @@ struct Init::Main : Sandbox::State_handler
Xml_node const config = _config.xml();
bool reporter_enabled = false;
config.with_sub_node("report", [&] (Xml_node report) {
config.with_optional_sub_node("report", [&] (Xml_node report) {
reporter_enabled = true;