Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: mojo/public/cpp/bindings/lib/array_internal.h

Issue 1535943002: Convert Pass()→std::move() in //mojo/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Regenerate correctly Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/interface_request.h ('k') | mojo/public/cpp/bindings/lib/array_serialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/array_internal.h
diff --git a/mojo/public/cpp/bindings/lib/array_internal.h b/mojo/public/cpp/bindings/lib/array_internal.h
index 7954eb626e3463241fd354f0e584463b2ecfcae6..d351b3423b56dd7b0b23f3667e31e1c1b57d042d 100644
--- a/mojo/public/cpp/bindings/lib/array_internal.h
+++ b/mojo/public/cpp/bindings/lib/array_internal.h
@@ -7,8 +7,8 @@
#include <stddef.h>
#include <stdint.h>
-
#include <new>
+#include <utility>
#include <vector>
#include "mojo/public/c/system/macros.h"
@@ -505,7 +505,7 @@ struct ArrayTraits<T, true> {
static inline void PushBack(std::vector<StorageType>* vec, RefType value) {
size_t old_size = vec->size();
ResizeStorage(vec, old_size + 1);
- new (vec->at(old_size).buf) T(value.Pass());
+ new (vec->at(old_size).buf) T(std::move(value));
}
static inline void ResizeStorage(std::vector<StorageType>* vec, size_t size) {
if (size <= vec->capacity()) {
@@ -514,7 +514,7 @@ struct ArrayTraits<T, true> {
}
std::vector<StorageType> new_storage(size);
for (size_t i = 0; i < vec->size(); i++)
- new (new_storage.at(i).buf) T(at(vec, i).Pass());
+ new (new_storage.at(i).buf) T(std::move(at(vec, i)));
vec->swap(new_storage);
Finalize(&new_storage);
}
« no previous file with comments | « mojo/public/cpp/bindings/interface_request.h ('k') | mojo/public/cpp/bindings/lib/array_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698