mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
session_label: make typedef String public
Internally, Genode::Session_label has a typedef from String<capacity()> to
String. To have this typedef public is especially useful when reading a
label from an XML node. This can then be written as
! Session_label label = node.attribute_value("label", Session_label::String());
instead of
! Session_label label = node.attribute_value("label", String<160>());
which would be less generic (Session_label cannot be used directly as there
is no appropriate ascii_to implementation).
Issue #2840
This commit is contained in:
committed by
Norman Feske
parent
14357b0b44
commit
fc90c5f8f0
@@ -25,13 +25,12 @@ struct Genode::Session_label : String<160>
|
||||
{
|
||||
private:
|
||||
|
||||
typedef String<capacity()> String;
|
||||
|
||||
static char const *_separator() { return " -> "; }
|
||||
static size_t _separator_len() { return 4; }
|
||||
|
||||
public:
|
||||
|
||||
using String = String<capacity()>;
|
||||
using String::String;
|
||||
|
||||
Session_label last_element() const
|
||||
|
||||
Reference in New Issue
Block a user