avoid unnecessary copies with emplace_back()#4450
Merged
orbitcowboy merged 2 commits intocppcheck-opensource:mainfrom Sep 10, 2022
Merged
avoid unnecessary copies with emplace_back()#4450orbitcowboy merged 2 commits intocppcheck-opensource:mainfrom
emplace_back()#4450orbitcowboy merged 2 commits intocppcheck-opensource:mainfrom
Conversation
46fe393 to
7b1acce
Compare
7b1acce to
53e2028
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is split from similar changes for
push_back()as some of those caused sizable regressions which need to be investigated first :( This is another step in preparation of applying themisc-const-correctnessclang-tidy-16 fixes.The impact is neglectable but there are no regressions.
Performing a
--enable=all --inconclusivescan onmame_regtest.With
DISABLE_VALUEFLOW=1:GCC 12
1,849,957,730->1,849,441,950Clang 14
1,901,388,783->1,901,388,929With Valueflow enabled:
Clang 14
50,981,418,024->50,988,014,183GCC 12
54,791,127,471->54,794,443,556And scanning
cliwith--enable=all --inconclusive -Ilib -D __GNUC__andDISABLE_VALUEFLOW=1GCC 12
3,216,157,747->3,215,371,284Clang 14
3,178,610,619->3,178,527,042