зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1271751 - part 6 - make ShiftData actually move its elements rather than copying; r=erahm
This change eliminates the last use of the Copy* family of functions.
This commit is contained in:
Родитель
0dc761e84b
Коммит
3d1192cadc
|
@ -269,7 +269,7 @@ nsTArray_base<Alloc, Copy>::ShiftData(index_type aStart,
|
|||
aNewLen *= aElemSize;
|
||||
aOldLen *= aElemSize;
|
||||
char* baseAddr = reinterpret_cast<char*>(mHdr + 1) + aStart;
|
||||
Copy::CopyOverlappingRegion(baseAddr + aNewLen, baseAddr + aOldLen, num, aElemSize);
|
||||
Copy::MoveOverlappingRegion(baseAddr + aNewLen, baseAddr + aOldLen, num, aElemSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче