diff options
author | Max Horn | 2002-07-08 11:55:55 +0000 |
---|---|---|
committer | Max Horn | 2002-07-08 11:55:55 +0000 |
commit | 32ea67dfed453f60442bdf3340edcb379ff86932 (patch) | |
tree | 5f04b03e0b7a173cc4ae9dfb33e9bb83773cf99c /gui/dialog.cpp | |
parent | d262c4e6dca83b214c54c96f474cb1e766e77885 (diff) | |
download | scummvm-rg350-32ea67dfed453f60442bdf3340edcb379ff86932.tar.gz scummvm-rg350-32ea67dfed453f60442bdf3340edcb379ff86932.tar.bz2 scummvm-rg350-32ea67dfed453f60442bdf3340edcb379ff86932.zip |
got rid of RTTI again (i.e. dynamic_cast)
svn-id: r4492
Diffstat (limited to 'gui/dialog.cpp')
-rw-r--r-- | gui/dialog.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 850c490702..682a36fb2c 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -56,9 +56,8 @@ void Dialog::handleKey(char key, int modifiers) Widget *w = _firstWidget; key = toupper(key); while (w) { - ButtonWidget *b = dynamic_cast<ButtonWidget *>(w); - if (b && key == toupper(b->_hotkey)) { - b->handleClick(1); + if (w->_type == kButtonWidget && key == toupper(((ButtonWidget *)w)->_hotkey)) { + w->handleClick(1); break; } w = w->_next; |