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

Move GetColorFromString away from strtol #8867

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

paulcam206
Copy link
Member

UWP's GetColorFromString calls strtol, which is not locale-independent. This means that it may take a longer time than anticpated to convert a string to an int. The fix is to use std::from_chars, which is designed for parsing scenarios and is locale-invariant. While I was at it, I cleaned up the logic a bit.

This should fix ADO #45516745.

@paulcam206 paulcam206 enabled auto-merge (squash) April 4, 2024 21:56
@paulcam206 paulcam206 merged commit aec0545 into main Apr 4, 2024
8 checks passed
@paulcam206 paulcam206 deleted the paulcam/getcolorfromstring-fixes branch April 4, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants