The function does modify the object since it changes the name of a layer it owns. Ideally this wouldn't be possible, but raw pointers don't have ownership semantics so this is a common problem with CustomData.
The function does modify the object since it changes the name of a layer it owns. Ideally this wouldn't be possible, but raw pointers don't have ownership semantics so this is a common problem with CustomData.