Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D84807
This commit is contained in:
Simon Giesecke
2020-08-04 11:27:07 +00:00
parent 073b2c89a4
commit 1fbb2b245e
134 changed files with 331 additions and 406 deletions

View File

@@ -1953,8 +1953,7 @@ void nsCellMap::RebuildConsideringRows(
NS_ASSERTION(!!aMap.mBCInfo == mIsBC, "BC state mismatch");
// copy the old cell map into a new array
uint32_t numOrigRows = mRows.Length();
nsTArray<CellDataArray> origRows;
mRows.SwapElements(origRows);
nsTArray<CellDataArray> origRows = std::move(mRows);
int32_t rowNumberChange;
if (aRowsToInsert) {
@@ -2053,8 +2052,7 @@ void nsCellMap::RebuildConsideringCells(
NS_ASSERTION(!!aMap.mBCInfo == mIsBC, "BC state mismatch");
// copy the old cell map into a new array
int32_t numOrigRows = mRows.Length();
nsTArray<CellDataArray> origRows;
mRows.SwapElements(origRows);
nsTArray<CellDataArray> origRows = std::move(mRows);
int32_t numNewCells = (aCellFrames) ? aCellFrames->Length() : 0;