Skip to content

[Vt] Update TF_FOR_ALL to C++11 iterator #3584

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Cewein
Copy link

@Cewein Cewein commented Apr 2, 2025

Description of Change(s)

Update files under pxr/base/vt by replacing TF_FOR_ALL with C++11-style range-based for each loop.

Important notes

There is an example the might be worth looking into since some of the code that not use TF_FOR_ALL could be using also C++11 iterator, specifically :

for (VtDoubleArray::const_iterator i = da.begin(); i != da.end(); ++i)
if (*i != val++)
die("iterator");

could just be :

for (const auto& element : da) {
    if (element != val++)
        die("iterator");
}

Open Issue(s)

This PR addresses issue #80, though many more instances still need to be resolved.

Checklist

VtDictionary has a proper iterator built in allowing to change to c++ iterator.

Function can't be simplify since point check are needed. this could be linked to another issue maybe regarding TF_CODING_ERROR.
@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-10853

❗ Please make sure that a signed CLA has been submitted!

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

@jesschimein
Copy link
Collaborator

/AzurePipelines run

3 similar comments
@tallytalwar
Copy link
Contributor

/AzurePipelines run

@tallytalwar
Copy link
Contributor

/AzurePipelines run

@jesschimein
Copy link
Collaborator

/AzurePipelines run

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