Retire some instanceOf usage.

More can be retired.  Eventually, I think I can eliminate
the poor-man's RTTI in `Identity::Class`.
This commit is contained in:
2025-08-09 05:44:53 -04:00
parent 6ec7e50758
commit 0bf153b049
2 changed files with 10 additions and 9 deletions

View File

@ -798,8 +798,8 @@ bool DilloHtml::HtmlLinkReceiver::click (Widget *widget, int link, int img,
/* Change the link color to "visited" as visual feedback */
for (Widget *w = widget; w; w = w->getParent()) {
_MSG(" ->%s\n", w->getClassName());
if (w->instanceOf<dw::Textblock>()) {
((Textblock*)w)->changeLinkColor (link, html->visited_color);
if (auto *tb= dynamic_cast< Textblock *>( w )) {
tb->changeLinkColor (link, html->visited_color);
break;
}
}