diff options
author | Max Wipfli <mail@maxwipfli.ch> | 2021-06-28 11:02:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-29 13:18:03 +0200 |
commit | e0ed160372688546be6fd0e575003f8eb6aafbc3 (patch) | |
tree | ab1d924bf286f85eb2c2e87f18d5a9164d074a8b /Userland | |
parent | 13b2067da6e34da778cf68b10602079b27460d21 (diff) | |
download | serenity-e0ed160372688546be6fd0e575003f8eb6aafbc3.zip |
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.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/Spreadsheet/Spreadsheet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/Spreadsheet/Spreadsheet.cpp b/Userland/Applications/Spreadsheet/Spreadsheet.cpp index 9168bda722..fa6b81ae72 100644 --- a/Userland/Applications/Spreadsheet/Spreadsheet.cpp +++ b/Userland/Applications/Spreadsheet/Spreadsheet.cpp @@ -376,7 +376,7 @@ RefPtr<Sheet> Sheet::from_json(const JsonObject& object, Workbook& workbook) format.background_color = Color::from_string(value.as_string()); }; - cells.for_each_member([&](auto& name, JsonValue& value) { + cells.for_each_member([&](auto& name, JsonValue const& value) { auto position_option = sheet->parse_cell_name(name); if (!position_option.has_value()) return IterationDecision::Continue; |