mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
Userland: Replace VERIFY(is<T>) with verify_cast<T>
Instead of doing a VERIFY(is<T>(x)) and *then* casting it to T, we can just do the cast right away with verify_cast<T>. :^)
This commit is contained in:
parent
7fef8c5648
commit
e59bf87374
10 changed files with 26 additions and 43 deletions
|
@ -450,13 +450,13 @@ void dump_sheet(const CSS::StyleSheet& sheet)
|
|||
dbgln("{}", builder.string_view());
|
||||
}
|
||||
|
||||
void dump_sheet(StringBuilder& builder, const CSS::StyleSheet& sheet)
|
||||
void dump_sheet(StringBuilder& builder, CSS::StyleSheet const& sheet)
|
||||
{
|
||||
VERIFY(is<CSS::CSSStyleSheet>(sheet));
|
||||
auto& css_stylesheet = verify_cast<CSS::CSSStyleSheet>(sheet);
|
||||
|
||||
builder.appendff("CSSStyleSheet{{{}}}: {} rule(s)\n", &sheet, static_cast<const CSS::CSSStyleSheet&>(sheet).rules().size());
|
||||
builder.appendff("CSSStyleSheet{{{}}}: {} rule(s)\n", &sheet, css_stylesheet.rules().size());
|
||||
|
||||
for (auto& rule : static_cast<const CSS::CSSStyleSheet&>(sheet).rules()) {
|
||||
for (auto& rule : css_stylesheet.rules()) {
|
||||
dump_rule(builder, rule);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue