mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 07:08:18 +00:00
base: add util/dictionary.h utility
The new 'Dictionary' provides an easy way to access objects using strings as key. The 'String' received the 'operator >' to simplify the organization of strings in an AVL tree. The patch removes the former definition of the 'operator >' from the platform driver because it would be ambigious now. Fixes #4610
This commit is contained in:
@ -808,6 +808,12 @@ class Genode::String
|
||||
return strcmp(string(), other.string()) != 0;
|
||||
}
|
||||
|
||||
template <size_t N>
|
||||
bool operator > (String<N> const &other) const
|
||||
{
|
||||
return strcmp(string(), other.string()) > 0;
|
||||
}
|
||||
|
||||
void print(Output &out) const { Genode::print(out, string()); }
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user