diff --git a/repos/base/include/util/xml_node.h b/repos/base/include/util/xml_node.h index ae8df1b687..b551ac861e 100644 --- a/repos/base/include/util/xml_node.h +++ b/repos/base/include/util/xml_node.h @@ -152,7 +152,7 @@ class Genode::Xml_attribute * conversion failed */ template <typename T> - bool value(T *out) const + bool value(T &out) const { /* * The '_value' token starts with a quote, which we @@ -160,9 +160,17 @@ class Genode::Xml_attribute * the length, we have to consider both the starting * and the trailing quote character. */ - return ascii_to(_value.start() + 1, *out) == _value.len() - 2; + return ascii_to(_value.start() + 1, out) == _value.len() - 2; } + /** + * Return attribute value as typed value + * + * \deprecated use 'value(T &out)' instead + */ + template <typename T> + bool value(T *out) const { return value(*out); } + /** * Return attribute value as Genode::String */ @@ -625,8 +633,15 @@ class Genode::Xml_node * \return true on success */ template <typename T> - bool value(T *out) const { - return ascii_to(content_addr(), *out) == content_size(); } + bool value(T &out) const { + return ascii_to(content_addr(), out) == content_size(); } + + /** + * Read content as typed value from XML node + * + * \deprecated use 'value(T &out)' instead + */ + template <typename T> bool value(T *out) const { return value(*out); } /** * Return begin of node including the start tag