Skip to content

Commit a2eb495

Browse files
committed
Style changes
1 parent 47c7444 commit a2eb495

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

llvm/include/llvm/ADT/SmallSet.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,23 +222,22 @@ class SmallSet {
222222
"ArgType must be convertible to T!");
223223
if (!isSmall()) {
224224
auto [I, Inserted] = Set.insert(std::forward<ArgType>(V));
225-
return std::make_pair(const_iterator(I), Inserted);
225+
return {const_iterator(I), Inserted};
226226
}
227227

228-
auto I = llvm::find(Vector, V);
229-
if (I != Vector.end()) // Don't reinsert if it already exists.
230-
return std::make_pair(const_iterator(I), false);
228+
if (auto I = llvm::find(Vector, V);
229+
I != Vector.end()) // Don't reinsert if it already exists.
230+
return {const_iterator(I), false};
231231
if (Vector.size() < N) {
232232
Vector.push_back(std::forward<ArgType>(V));
233-
return std::make_pair(const_iterator(std::prev(Vector.end())), true);
233+
return {const_iterator(std::prev(Vector.end())), true};
234234
}
235235

236236
// Otherwise, grow from vector to set.
237237
Set.insert(std::make_move_iterator(Vector.begin()),
238238
std::make_move_iterator(Vector.end()));
239239
Vector.clear();
240-
return std::make_pair(
241-
const_iterator(Set.insert(std::forward<ArgType>(V)).first), true);
240+
return {const_iterator(Set.insert(std::forward<ArgType>(V)).first), true};
242241
}
243242
};
244243

0 commit comments

Comments
 (0)