mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibWeb: Optimize CSS::StyleDeclaration for size
We can reduce the amount of padding the compiler adds in order to ensure data alignment of member variables by ordering the types in a struct by size in decending order. Found By PVS-Studio: https://pvs-studio.com/en/docs/warnings/v802/
This commit is contained in:
committed by
Andreas Kling
parent
1b00ddf07e
commit
027cbe6b89
@@ -87,9 +87,9 @@ bool PropertyOwningCSSStyleDeclaration::set_property(PropertyID property_id, Str
|
||||
}
|
||||
|
||||
m_properties.append(CSS::StyleProperty {
|
||||
.important = false,
|
||||
.property_id = property_id,
|
||||
.value = new_value.release_nonnull(),
|
||||
.important = false,
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user