-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
C++20: use view() instead of str() to avoid a copy, use starts_with #13218
Merged
acoates-ms
merged 8 commits into
microsoft:main
from
servusdei2018:servusdei2018-patch-1
May 14, 2024
Merged
C++20: use view() instead of str() to avoid a copy, use starts_with #13218
acoates-ms
merged 8 commits into
microsoft:main
from
servusdei2018:servusdei2018-patch-1
May 14, 2024
Conversation
This file contains 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
Signed-off-by: Nathanael Bracy <nate@bracy.dev>
@servusdei2018 - please run |
Hm I tried running react-native-windows$ yarn format
yarn run v1.22.22
$ format-files -i -style=file
ran clang-format on 1119 files
Done in 3.35s.
react-native-windows$ git status
On branch servusdei2018-patch-1
Your branch is up to date with 'origin/servusdei2018-patch-1'.
nothing to commit, working tree clean |
jonthysell
requested changes
May 13, 2024
change/react-native-windows-f53a2b65-d364-49a5-978c-5d64e08c22ea.json
Outdated
Show resolved
Hide resolved
change/react-native-windows-f53a2b65-d364-49a5-978c-5d64e08c22ea.json
Outdated
Show resolved
Hide resolved
microsoft-github-policy-service
bot
added
the
Needs: Author Feedback
The issue/PR needs activity from its author (label drives bot activity)
label
May 13, 2024
Co-authored-by: Jon Thysell <thysell@gmail.com>
microsoft-github-policy-service
bot
removed
the
Needs: Author Feedback
The issue/PR needs activity from its author (label drives bot activity)
label
May 13, 2024
Signed-off-by: Nathanael Bracy <nate@bracy.dev>
marlenecota
approved these changes
May 14, 2024
acoates-ms
added a commit
to acoates-ms/react-native-windows
that referenced
this pull request
May 14, 2024
…icrosoft#13218) * Change files * C++20: use view() instead of str() to avoid a copy, use starts_with Signed-off-by: Nathanael Bracy <nate@bracy.dev> * fix * Apply changefile modifications from code review Co-authored-by: Jon Thysell <thysell@gmail.com> * Revert package.json Signed-off-by: Nathanael Bracy <nate@bracy.dev> --------- Signed-off-by: Nathanael Bracy <nate@bracy.dev> Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Co-authored-by: Jon Thysell <thysell@gmail.com>
acoates-ms
added a commit
to acoates-ms/react-native-windows
that referenced
this pull request
May 14, 2024
…s_with (microsoft#13218)" This reverts commit 71335b5.
acoates-ms
added a commit
that referenced
this pull request
May 14, 2024
* Cleanup the snapshots in E2E test app (#13229) * Cleanup the snapshots * format * Process snapshots so that ImageSource Uri's are consistent * Change files * fix * fix * fix(TextInput/isFocused): correctly handle null focused input (#13219) * Change files * fix(TextInput/isFocused): correctly handle null focused input Signed-off-by: Nathanael Bracy <nate@bracy.dev> * fix --------- Signed-off-by: Nathanael Bracy <nate@bracy.dev> Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> * Fixing crash when passing null children to view with no-hide-descendents (#13224) * Preventing crash when passing null children to view with no-hide-descendents * Change files --------- Co-authored-by: Sam Walker <sawalker@microsoft.com> Co-authored-by: Andrew <30809111+acoates-ms@users.noreply.github.com> * C++20: use view() instead of str() to avoid a copy, use starts_with (#13218) * Change files * C++20: use view() instead of str() to avoid a copy, use starts_with Signed-off-by: Nathanael Bracy <nate@bracy.dev> * fix * Apply changefile modifications from code review Co-authored-by: Jon Thysell <thysell@gmail.com> * Revert package.json Signed-off-by: Nathanael Bracy <nate@bracy.dev> --------- Signed-off-by: Nathanael Bracy <nate@bracy.dev> Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com> Co-authored-by: Jon Thysell <thysell@gmail.com> * ViewComponentView should be activatable from rn-win32.dll (#13225) * ViewComponentView should be activatable from rn-win32.dll * Change files * Cleanup the snapshots in E2E test app (#13229) * Cleanup the snapshots * format * Process snapshots so that ImageSource Uri's are consistent * Change files * fix * fix * lint * format * Revert "C++20: use view() instead of str() to avoid a copy, use starts_with (#13218)" This reverts commit 71335b5. --------- Signed-off-by: Nathanael Bracy <nate@bracy.dev> Co-authored-by: Nate <37554478+servusdei2018@users.noreply.github.com> Co-authored-by: Sam Walker <samuel.ls.walker@gmail.com> Co-authored-by: Sam Walker <sawalker@microsoft.com> Co-authored-by: Jon Thysell <thysell@gmail.com>
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.
Description
Use
view()
instead ofstr()
,starts_with()
instead of_Starts_with()
.Why
Resolves two TODO items
What
One instance of a
str()
invocation was replaced withview()
, avoiding an unnecessary copy. Additionally, the private function_Starts_with()
was replaced with C++20'sstarts_with()
.Changelog
Should this change be included in the release notes: no
Microsoft Reviewers: Open in CodeFlow