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

Unified Diff: mojo/public/cpp/bindings/lib/map_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
Index: mojo/public/cpp/bindings/lib/map_internal.h
diff --git a/mojo/public/cpp/bindings/lib/map_internal.h b/mojo/public/cpp/bindings/lib/map_internal.h
index e0ec5d710bd667c902a2b920b25968fe20ebc42f..a335114ee657783dcbd8281881c153f9a9c4d3c3 100644
--- a/mojo/public/cpp/bindings/lib/map_internal.h
+++ b/mojo/public/cpp/bindings/lib/map_internal.h
@@ -6,8 +6,8 @@
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_INTERNAL_H_
#include <stddef.h>
-
#include <map>
+#include <utility>
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/lib/template_util.h"
@@ -146,7 +146,7 @@ struct MapTraits<Key, Value, true> {
it != m->end();
++it, ++i) {
(*keys)[i] = it->first;
- (*values)[i] = GetValue(it).Pass();
+ (*values)[i] = std::move(GetValue(it));
}
}
static inline void Finalize(std::map<KeyStorageType, ValueStorageType>* m) {
@@ -190,7 +190,7 @@ struct MapTraits<Key, Value, true> {
// have to do a manual check so that we don't overwrite an existing object.
auto it = m->find(key);
if (it == m->end())
- new ((*m)[key].buf) Value(value.Pass());
+ new ((*m)[key].buf) Value(std::move(value));
}
static inline KeyConstRefType GetKey(
const typename std::map<KeyStorageType, ValueStorageType>::const_iterator&
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_ptr_state.h ('k') | mojo/public/cpp/bindings/lib/map_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698