Convert C-style casts to C++-style