mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 15:43:56 +00: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
@ -211,7 +211,7 @@ struct Terminal::Main : Character_consumer
|
||||
_fb_mode = _gui.mode();
|
||||
|
||||
/* apply initial size from config, if provided */
|
||||
_config.xml().with_sub_node("initial", [&] (Xml_node const &initial) {
|
||||
_config.xml().with_optional_sub_node("initial", [&] (Xml_node const &initial) {
|
||||
_fb_mode.area = Area(initial.attribute_value("width", _fb_mode.area.w()),
|
||||
initial.attribute_value("height", _fb_mode.area.h()));
|
||||
});
|
||||
|
Reference in New Issue
Block a user