C style cast to C++ style casts