Remove redundant type casts