As a follow-up to #25967 (review), this PR changes the return type of BaseIndex::GetName()
to const std::string&
instead of const char*
. The first commit is not essential for this change, but since the code is touched and index names are commonly used to specify thread names, I’ve made the same update there.
No behaviour change, just refactoring to further phase out C-style strings.
Note: util::ThreadRename()
used to take an rvalue ref, but since it then passes this to SetInternalName()
by value, I don’t think there’s any benefit to having both an rvalue and lvalue ref function so I just changed it into lvalue ref. Not 100% sure I’m missing something?