Use static cast instead of C style cast.