A separate function for a simple compare and cast? While that would make it more legible, wouldn't that slow it down by having to call a function? The tradeoff if executable size for speed in most instances. Why not turn it into a macro instead of a function so that we preserve speed? Every little bit helps.