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

Unified Diff: mojo/public/cpp/bindings/array.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 | « no previous file | mojo/public/cpp/bindings/associated_binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/array.h
diff --git a/mojo/public/cpp/bindings/array.h b/mojo/public/cpp/bindings/array.h
index bc998606f46503df67ef8380a58509bd5db33b7a..fdcc6fb54c92935723e5cb8a0964660802f5de74 100644
--- a/mojo/public/cpp/bindings/array.h
+++ b/mojo/public/cpp/bindings/array.h
@@ -7,10 +7,10 @@
#include <stddef.h>
#include <string.h>
-
#include <algorithm>
#include <set>
#include <string>
+#include <utility>
#include <vector>
#include "mojo/public/cpp/bindings/lib/array_internal.h"
@@ -57,7 +57,7 @@ class Array {
// Creates a non-null array of the specified size. The elements will be
// value-initialized (meaning that they will be initialized by their default
// constructor, if any, or else zero-initialized).
- static Array New(size_t size) { return Array(size).Pass(); }
+ static Array New(size_t size) { return std::move(Array(size)); }
// Creates a new array with a copy of the contents of |other|.
template <typename U>
@@ -146,7 +146,7 @@ class Array {
Array result;
result.is_null_ = is_null_;
Traits::Clone(vec_, &result.vec_);
- return result.Pass();
+ return std::move(result);
}
// Indicates whether the contents of this array are equal to |other|. A null
@@ -197,7 +197,7 @@ struct TypeConverter<Array<T>, std::vector<E>> {
Array<T> result(input.size());
for (size_t i = 0; i < input.size(); ++i)
result[i] = TypeConverter<T, E>::Convert(input[i]);
- return result.Pass();
+ return std::move(result);
}
};
@@ -226,7 +226,7 @@ struct TypeConverter<Array<T>, std::set<E>> {
Array<T> result(0u);
for (auto i : input)
result.push_back(TypeConverter<T, E>::Convert(i));
- return result.Pass();
+ return std::move(result);
}
};
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/associated_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698