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:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user