1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:57:36 +00:00

AK: Use OrderedHashMap in JsonObject

This changes JsonObject to use the new OrderedHashMap instead of an
extra vector for tracking the insertion order.

This also adds a default value for the KeyTraits template argument in
OrderedHashMap. Furthermore, it fixes two cases where code iterating
over a JsonObject relied on the value argument being copied before
invoking the callback.
This commit is contained in:
Max Wipfli 2021-06-28 11:02:18 +02:00 committed by Andreas Kling
parent 13b2067da6
commit e0ed160372
3 changed files with 11 additions and 26 deletions

View file

@ -78,7 +78,7 @@ using OrderedHashTable = HashTable<T, TraitsForT, true>;
template<typename K, typename V, typename KeyTraits = Traits<K>, bool IsOrdered = false>
class HashMap;
template<typename K, typename V, typename KeyTraits>
template<typename K, typename V, typename KeyTraits = Traits<K>>
using OrderedHashMap = HashMap<K, V, KeyTraits, true>;
template<typename T>