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

Change value type of TfUtf8CodePointIterator to TfUtf8CodePoint #2906

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

nvmkuruc
Copy link
Collaborator

Description of Change(s)

TfUtf8CodePointIterator was originally written before the TfUtf8CodePoint class was introduced. This change makes the value and reference type of the iterator a TfUtf8CodePoint directly instead of expecting clients to construct it themselves.

It also introduces a TfUtf8CodePointFromAscii helper function to make it easier to create code points from known ASCII characters.

This change also simplifies several test cases and usages. For example, _IsValidIdentifier no longer has to branch.

Currently, both the iterator and the code point class employ validation to ensure that code points outside the unicode range or surrogate code points are not decoded. It may be desirable to avoid this redundancy so that the validation is delegated entirely to the code point class in a future change.

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@jesschimein
Copy link
Contributor

Filed as internal issue #USD-9180

@pixar-oss pixar-oss merged commit 5552dbf into PixarAnimationStudios:dev Feb 5, 2024
5 checks passed
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.

3 participants