Bug 1624756 - Use EmplaceBack instead of AppendElement(std::make_pair) in TrackSizingFunction::ExpandNonRepeatAutoTracks r=mats

Differential Revision: https://phabricator.services.mozilla.com/D68130

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emily McDonough 2020-03-31 16:36:26 +00:00
Родитель 1607c04785
Коммит 9ae2ce3fae
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1270,7 +1270,7 @@ struct nsGridContainerFrame::TrackSizingFunctions {
for (size_t i = 0; i < mTrackListValues.Length(); ++i) {
auto& value = mTrackListValues[i];
if (value.IsTrackSize()) {
mExpandedTracks.AppendElement(std::make_pair(i, size_t(0)));
mExpandedTracks.EmplaceBack(i, 0);
continue;
}
auto& repeat = value.AsTrackRepeat();
@ -1278,14 +1278,14 @@ struct nsGridContainerFrame::TrackSizingFunctions {
MOZ_ASSERT(i == mRepeatAutoStart);
mRepeatAutoStart = mExpandedTracks.Length();
mRepeatAutoEnd = mRepeatAutoStart + repeat.track_sizes.Length();
mExpandedTracks.AppendElement(std::make_pair(i, size_t(0)));
mExpandedTracks.EmplaceBack(i, 0);
continue;
}
for (auto j : IntegerRange(repeat.count.AsNumber())) {
Unused << j;
size_t trackSizesCount = repeat.track_sizes.Length();
for (auto k : IntegerRange(trackSizesCount)) {
mExpandedTracks.AppendElement(std::make_pair(i, k));
mExpandedTracks.EmplaceBack(i, k);
}
}
}