Skip to content

Commit 57d1037

Browse files
committed
clean up iterator usage
1 parent 78a6a34 commit 57d1037

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Frontend/HLSL/HLSLBinding.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ BindingInfo::findAvailableBinding(dxil::ResourceClass RC, uint32_t Space,
2222

2323
BindingInfo::RegisterSpace &
2424
BindingInfo::BindingSpaces::getOrInsertSpace(uint32_t Space) {
25-
for (auto *I = Spaces.begin(); I != Spaces.end(); ++I) {
26-
if (I->Space == Space)
27-
return *I;
28-
if (I->Space < Space)
25+
for (auto It = Spaces.begin(), End = Spaces.end(); It != End; ++It) {
26+
if (It->Space == Space)
27+
return *It;
28+
if (It->Space < Space)
2929
continue;
30-
return *Spaces.insert(I, Space);
30+
return *Spaces.insert(It, Space);
3131
}
3232
return Spaces.emplace_back(Space);
3333
}

0 commit comments

Comments
 (0)