isle-portable
isle-portable copied to clipboard
Add template helper for `dynamic_cast`'s
dynamic_cast's shouldn't fail. Where they do, we need to add logging (or better, an assert)
It depends on the reason for the dynamic_cast: If the cast is to test if an object is a kind of class, they shouldn't be changed. if the cast is meant to turn the object explicitly into a specific class, perhaps static_cast would fit better?
@foxtacles there are only 2 of these, is a template really needed?
I would at least like an assert so that the dynamic casts don't quietly fail. If we only have 2 of these and won't have more than I guess we can save us the template.