Replace unnecessary reinterpret_casts with static_cast.