If I understand the code correctly, this function returns a copy of the name. So it doesn't have to be const.