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

Dev fix implicit conversion #3527

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

brtmax
Copy link

@brtmax brtmax commented Feb 7, 2025

Description of Change(s)

Added explicit static_cast when converting to mt19937::result_type (uint_fast32_t) from:

  • system_clock time count (64-bit integer)
  • Large integer, 5109223000

Even though we're going from larger integers
to 32-bits, this is fine for random number generation seeding. The explicit cast makes this clearer in the code and removes the compiler warnings for implicit conversion.

The changes are in the test files: testHdSortedIds.cpp and testHdSortedIdsPerf.cpp, both of which still pass with the changes. I looked at the contribution and coding guidelines, if I overlooked something or there is a preferred way of implementing these changes, please let me know.

Link to proposal (if applicable)

Fixes Issue(s)

#3339

Checklist

[x] I have created this PR based on the dev branch

[x] I have followed the coding conventions

[ ] I have added unit tests that exercise this functionality (Reference:
testing guidelines)

[x] I have verified that all unit tests pass with the proposed changes

[x] I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)

@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10663

(This is an automated message. See here for more information.)

@jesschimein
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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