Skip to content

[Clang-Tidy] Encourage the use of emplace#1219

Merged
Skylion007 merged 3 commits intomasterfrom
clang-tidy-use-emplace
May 6, 2021
Merged

[Clang-Tidy] Encourage the use of emplace#1219
Skylion007 merged 3 commits intomasterfrom
clang-tidy-use-emplace

Conversation

@Skylion007
Copy link
Copy Markdown
Contributor

Motivation and Context

  • Another code modernization clang-tidy rule. This one did find a few performance issues where emplace should have been used (mainly with std::pair and the voxel code.) I am fine with not enabling it by default, but we should at least merge in the code changes if there are no objections. I am also fine downgrading it to a warning. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html

How Has This Been Tested

  • Locally

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 5, 2021
@Skylion007 Skylion007 requested a review from aclegg3 May 5, 2021 22:13
Copy link
Copy Markdown
Contributor

@mosra mosra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good thing to do for me :)

@Skylion007 Skylion007 merged commit 9814c64 into master May 6, 2021
@Skylion007 Skylion007 deleted the clang-tidy-use-emplace branch May 6, 2021 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants