mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:18:11 +00:00
AK: Remove Optional::operator bool()
This was causing some obvious-in-hindsight but hard to spot bugs where we'd implicitly convert the bool to an integer type and carry on with the number 1 instead of the actual value().
This commit is contained in:
parent
ae233c1e82
commit
8bb361889c
6 changed files with 9 additions and 12 deletions
|
@ -209,7 +209,7 @@ NonnullRefPtr<StyleProperties> Element::computed_style()
|
|||
};
|
||||
for (CSS::PropertyID id : box_model_metrics) {
|
||||
auto prop = layout_node()->style().property(id);
|
||||
if (prop)
|
||||
if (prop.has_value())
|
||||
properties->set_property(id, prop.value());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue