Better move semantics & fix clang-tidy warnings#3606
Conversation
|
There too many changes for a single commit, I'd suggest grouping them per change type. |
| })); | ||
| } | ||
|
|
||
| // TODO: investigate clang-tidy warning about recursive call chain |
There was a problem hiding this comment.
I wouldn't recommend adding a TODO comment for something that comes from outside the source code (a tool), since the warning will eventually come up when running clang-tidy.
There was a problem hiding this comment.
Yeah that's more a note for myself to be honest, I intend to investigate and fix those two very soon so it's easier to see the todo rather than look up the warning again. But I agree with your advice generally.
They are really (all changes) fixing |
This is a PR born from the work that I've been doing lately in the networking areas -- things that did not belong to any specific PR, but generally fixing a few clang-tidy warnings and better usage of move semantics.
For a more thorough explanation of why some pass-by-ref is replaced with pass-by-value (and subsequent
std::moves), check out this comment, I think it explains it pretty well, but also feel free to bring up any thought you have here, I am open to discuss about it. Thanks!