Closed Clashsoft closed 4 years ago
@sharwell I think in this case just suppressing the warnings is better than adding the Class#cast
overhead, which is totally unnecessary because attributeType == o.getClass()
. Since the method is small and local, the suppression wont hurt anyone.
The call to cast
is negligible. It's a JIT intrinsic with a fast path return for the case where the types are equal:
I would prefer to use the stronger typing in the absence of proof of a problem (demonstrated performance problem via benchmarks).
Thanks guys!
This amends #233 with a minor change to the signature of
STGroup#getAttributeRenderer
, as requested by @sharwell.