selection_manager: use C++ style casts, whitespace changes