mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 15:21:04 +01:00
Stop using std::pair in the implementation of tuples (#479)
This commit is contained in:
@@ -16,12 +16,7 @@ const Expression* ParenContents::AsExpression(int line_number) const {
|
||||
}
|
||||
|
||||
const Expression* ParenContents::AsTuple(int line_number) const {
|
||||
auto vec =
|
||||
new std::vector<std::pair<std::string, const Carbon::Expression*>>();
|
||||
for (const FieldInitializer& initializer : fields_) {
|
||||
vec->push_back({initializer.name, initializer.expression});
|
||||
}
|
||||
return MakeTuple(line_number, vec);
|
||||
return MakeTuple(line_number, new std::vector<FieldInitializer>(fields_));
|
||||
}
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
Reference in New Issue
Block a user