@sephthir 
I got a warning that this cast was redundant and could be removed.  Since I can't compile right now, I couldn't verify if the message was bogus.  Did you get the same warning when you compiled?