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:
parent
d344253b08
commit
f84a7e2e22
7 changed files with 132 additions and 243 deletions
|
@ -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 {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue