Replace an old-style cast.