Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded string copy construction in StringIdMap #8843

Conversation

lingbin
Copy link
Contributor

@lingbin lingbin commented Feb 23, 2024

A variable of type std::string_view can be directly assigned to a
variable of type std::string. There is no need to construct a
temporary variable first and then assign the value. The latter will
cause a redundant copy construction.

No functional changes.

A variable of type `std::string_view` can be directly assigned to a
variable of type `std::string`. There is no need to construct a
temporary variable first and then assign the value. The latter will
cause a redundant copy construction.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 23, 2024
Copy link

netlify bot commented Feb 23, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit be21d88
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/65d8e1220ec50800083c14b2

@lingbin
Copy link
Contributor Author

lingbin commented Feb 23, 2024

@Yuhta could you please take a look, change is trivial, thanks.

@facebook-github-bot
Copy link
Contributor

@Yuhta has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@Yuhta merged this pull request in 3e4a26a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants