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
merged 4 commits into from May 17, 2020

Conversation

@OMGPizzaGuy
Copy link
Contributor

OMGPizzaGuy commented May 16, 2020

Replace remaining uses of IsOfType with dynamic_cast.
Consolide DEFINE_RUNTIME_CLASSTYPE_CODE_* macros.
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

OMGPizzaGuy May 16, 2020

Author Contributor

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

@mduggan
Copy link
Contributor

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.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
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.