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-03 14:54:18 +00:00
parent dfca836aa5
commit 9d2e516112
134 changed files with 328 additions and 412 deletions

View File

@@ -263,8 +263,7 @@ void nsOfflineCacheEvictionFunction::Apply() {
return;
}
appcachedetail::FileArray items;
items.SwapElements(*pitems);
appcachedetail::FileArray items = std::move(*pitems);
for (int32_t i = 0; i < items.Count(); i++) {
if (MOZ_LOG_TEST(gCacheLog, LogLevel::Debug)) {
@@ -2107,7 +2106,7 @@ nsresult nsOfflineCacheDevice::RunSimpleQuery(mozIStorageStatement* statement,
NS_ENSURE_SUCCESS(rv, rv);
}
values.SwapElements(valArray);
values = std::move(valArray);
return NS_OK;
}