C style casts to C++ style casts