Swapped c style casts for c++ style