remove obsolete static_cast statements