Skip to content
Commit 7c8c2c50 authored by Milian Wolff's avatar Milian Wolff
Browse files

Remove broken and basically unused fastCast code for types

Only a few places in the ::equals implementations used this code.
But it was not generic and actually unsafe to use elsewhere, note
how e.g. the implementation for TypeAlias used the wrong WhichType.
The implementation for ConstantIntegralType wasn't actually fast,
it still always required an dynamic_cast. And in general, all other
implementations where possibly broken for subclasses: When such
a subclass would return a different WhichType, we would have always
failed. Handling that would need a fallback to dynamic_cast, in which
case we don't really gain anything code-generation wise. I doubt the
speed impact is required - esp. considering this isn't used in
practice anywhere so far...

Just replace the few usages in assertions with dynamic_cast and get
rid of fastCast code.
parent 428eb19c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment