1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:47:44 +00:00

AK: Add new failable JsonArray::{append/set} functions

Move all old usages to the more explicit `JsonArray:must_{append/set}`
This commit is contained in:
Cameron Youell 2023-04-17 15:38:27 +10:00 committed by Andreas Kling
parent 3b00636288
commit 8134dccdc7
14 changed files with 28 additions and 25 deletions

View file

@ -542,7 +542,7 @@ JsonObject Sheet::to_json() const
if (!columns_are_standard()) {
auto columns = JsonArray();
for (auto& column : m_columns)
columns.append(column);
columns.must_append(column);
object.set("columns", move(columns));
}
object.set("rows", bottom_right.row + 1);
@ -587,7 +587,7 @@ JsonObject Sheet::to_json() const
fmt_object.set("condition", fmt.condition);
save_format(fmt, fmt_object);
conditional_formats.append(move(fmt_object));
conditional_formats.must_append(move(fmt_object));
}
data.set("conditional_formats", move(conditional_formats));