@@ -222,23 +222,22 @@ class SmallSet {
222
222
" ArgType must be convertible to T!" );
223
223
if (!isSmall ()) {
224
224
auto [I, Inserted] = Set.insert (std::forward<ArgType>(V));
225
- return std::make_pair ( const_iterator (I), Inserted) ;
225
+ return { const_iterator (I), Inserted} ;
226
226
}
227
227
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 } ;
231
231
if (Vector.size () < N) {
232
232
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 } ;
234
234
}
235
235
236
236
// Otherwise, grow from vector to set.
237
237
Set.insert (std::make_move_iterator (Vector.begin ()),
238
238
std::make_move_iterator (Vector.end ()));
239
239
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 };
242
241
}
243
242
};
244
243
0 commit comments