Miscellaneous C++ conversion.