From 9ae2ce3fae531dfdf5dd843ef62d0d27cc67df85 Mon Sep 17 00:00:00 2001 From: Emily McDonough Date: Tue, 31 Mar 2020 16:36:26 +0000 Subject: [PATCH] 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 --- layout/generic/nsGridContainerFrame.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index b729d3d544a1..7b45082c9f7e 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -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); } } }