mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:27:43 +00:00
LibIPC: Add encoder and decoder for AK::OrderedHashMap
Seems like a useful thing to have.
This commit is contained in:
parent
a8a50a994b
commit
f2b4c044db
2 changed files with 29 additions and 0 deletions
|
@ -57,6 +57,17 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
template<typename K, typename V>
|
||||
Encoder& operator<<(OrderedHashMap<K, V> const& hashmap)
|
||||
{
|
||||
*this << (u32)hashmap.size();
|
||||
for (auto it : hashmap) {
|
||||
*this << it.key;
|
||||
*this << it.value;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Encoder& operator<<(Vector<T> const& vector)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue