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

AK: Rename downcast<T> => verify_cast<T>

This makes it much clearer what this cast actually does: it will
VERIFY that the thing we're casting is a T (using is<T>()).
This commit is contained in:
Andreas Kling 2021-06-24 19:53:42 +02:00
parent 6215a9c2cb
commit ee3a73ddbb
61 changed files with 262 additions and 262 deletions

View file

@ -36,9 +36,9 @@ public:
{
for (auto& rule : m_rules)
if (rule.type() == CSSRule::Type::Style) {
callback(downcast<CSSStyleRule>(rule));
callback(verify_cast<CSSStyleRule>(rule));
} else if (rule.type() == CSSRule::Type::Import) {
const auto& import_rule = downcast<CSSImportRule>(rule);
const auto& import_rule = verify_cast<CSSImportRule>(rule);
if (import_rule.has_import_result())
import_rule.loaded_style_sheet()->for_each_effective_style_rule(callback);
}
@ -49,7 +49,7 @@ public:
{
for (auto& rule : m_rules)
if (rule.type() == CSSRule::Type::Import) {
auto& import_rule = downcast<CSSImportRule>(rule);
auto& import_rule = verify_cast<CSSImportRule>(rule);
if (!import_rule.has_import_result()) {
callback(import_rule);
return true;