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

boost::transform_iterator can be replaced #2272

Closed
nvmkuruc opened this issue Feb 13, 2023 · 3 comments
Closed

boost::transform_iterator can be replaced #2272

nvmkuruc opened this issue Feb 13, 2023 · 3 comments

Comments

@nvmkuruc
Copy link
Collaborator

nvmkuruc commented Feb 13, 2023

Description of Issue

There are currently two usages of boost::transform_iterator in USD.

In UsdProperty, it's used as the input to SdfPathFindLongestPrefix. However, SdfPathFindLongestPrefix also takes a function argument that is applied to the iterator. This argument can be used in transform_iterator's stead.

In stage.cpp, it's used twice. In _Stringify, an intermediate SdfPathVector is currently already created and so std::transform can be used without additional overhead. The other usage transforms the inputs for usage in a private internal helper function. However, the helper function is only used once in the file so the contract can be easily modified and the transformation moved inside of the helper.

Steps to Reproduce

N/A

System Information (OS, Hardware)

N/A

Package Versions

N/A

Build Flags

N/A

@nvmkuruc
Copy link
Collaborator Author

I have a fix.

@tallytalwar
Copy link
Contributor

Filed as internal issue #USD-8010

@nvmkuruc
Copy link
Collaborator Author

This was addressed last year and can be closed.

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

No branches or pull requests

2 participants