mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
jbig2-from-json: Use set() more
I missed this one earlier. No behavior change.
This commit is contained in:
1 parent
c781514c36
commit
8e4e88f540
1 file changed
+2
-4
@@ -1105,10 +1105,8 @@ static ErrorOr<Gfx::JBIG2::SegmentData> jbig2_pattern_dictionary_from_json(ToJSO
|
||||
|
||||
// FIXME: Make this more flexible.
|
||||
if (key == "image_data"sv) {
|
||||
if (value.is_object()) {
|
||||
image = TRY(jbig2_image_from_json(options, value.as_object()));
|
||||
return {};
|
||||
}
|
||||
if (value.is_object())
|
||||
return set(image, jbig2_image_from_json(options, value.as_object()));
|
||||
if (value.is_array()) {
|
||||
size_t width = 0;
|
||||
for (auto const& [i, image_json] : enumerate(value.as_array().values())) {
|
||||
|
||||
Reference in new issue
Block a user