Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ULTIMA8: Even more custom type checking cleanup #2254

merged 4 commits into from May 17, 2020


Copy link

OMGPizzaGuy commented May 16, 2020

Replace remaining uses of IsOfType with dynamic_cast.
Remove RunTimeClassType from classes that no longer need it.

The RunTimeClassType code is down only the classname used for saving and debugger info.

@@ -37,6 +37,10 @@ class Shape;
class Item;
class GumpNotifyProcess;

class Gump;
typedef bool (*FindGumpPredicate)(Gump *g);
template<class T> inline bool IsOfType(Gump *g) { return dynamic_cast<T*>(g) != nullptr; }

This comment has been minimized.

Copy link

OMGPizzaGuy May 16, 2020

Author Contributor

This perhaps could be more generic or be placed in a different file.

Copy link

mduggan commented May 17, 2020

All looks good to me, merging.

@mduggan mduggan merged commit 0249e24 into scummvm:master May 17, 2020
2 checks passed
2 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.