Merge bitcoin/bitcoin#25971: refactor: Use std::string for thread and index names
24.x26cf9ea8e4
scripted-diff: rename pszThread to thread_name (stickies-v)200d84d568
refactor: use std::string for index names (stickies-v)97f5b20c12
refactor: use std::string for thread names (stickies-v) Pull request description: As a follow-up to https://github.com/bitcoin/bitcoin/pull/25967#discussion_r959637189, this PR changes the return type of [`BaseIndex::GetName()`](fa5c224d44/src/index/base.h (L120)
) 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? ACKs for top commit: MarcoFalke: review ACK26cf9ea8e4
only change is new scripted-diff 😀 hebasto: ACK26cf9ea8e4
, I have reviewed the code and it looks OK. w0xlt: reACK26cf9ea8e4
Tree-SHA512: 44a03ebf2bb86ca1411a36222a575217cdba8ee3a3c985e74d74c934516f002b27336147fa22f59eda7dac21204a93951563317005d475da95b23c427014d77b
commit
5eb9781763
Loading…
Reference in new issue