1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

LibPDF: Replace Value class by AK::Variant

This decreases the memory consumption by LibPDF by 4 bytes per Value,
compensating exactly for the increase in an earlier commit. :^)
This commit is contained in:
Ben Wiederhake 2021-09-19 20:56:05 +02:00 committed by Ali Mohammad Pur
parent d344253b08
commit f84a7e2e22
7 changed files with 132 additions and 243 deletions

View file

@ -60,10 +60,10 @@ RefPtr<CalRGBColorSpace> CalRGBColorSpace::create(RefPtr<Document> document, Vec
return {};
auto param = parameters[0];
if (!param.is_object() || !param.as_object()->is_dict())
if (!param.has<NonnullRefPtr<Object>>() || !param.get<NonnullRefPtr<Object>>()->is_dict())
return {};
auto dict = object_cast<DictObject>(param.as_object());
auto dict = object_cast<DictObject>(param.get<NonnullRefPtr<Object>>());
if (!dict->contains(CommonNames::WhitePoint))
return {};