fixed many COPY_INSTEAD_OF_MOVE Coverity warnings#5944
Conversation
cli/cppcheckexecutor.cpp
Outdated
|
|
||
| CppCheck cppCheck(*mStdLogger, true, executeCommand); | ||
| cppCheck.settings() = settings; | ||
| cppCheck.settings() = std::move(settings); |
There was a problem hiding this comment.
This is a bogus warning. The object is referenced in StdLogger.
There was a problem hiding this comment.
The Settings object should also be const after construction to make sure it is no longer modified afterwards. That is still WIP.
Also the copy will go away after #4964 is done.
There was a problem hiding this comment.
This is a variant of https://trac.cppcheck.net/ticket/12364.
949bfe2 to
d307417
Compare
|
The |
3732603 to
c636b73
Compare
danmar
left a comment
There was a problem hiding this comment.
seems like we could easily find lots of more performance issues..
I gave it a short spin in the profiler and it doesn't have much of an impact. Guess the most important were already found earlier by review and profiling. |
No description provided.