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

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: Remove self-move checks to avoid triggering clang warning. 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 84f927c9918144fcd2c8bbca02874d94ab31b026..f2a75d783d0d7edea1a7c842cf11cd2c7fa55557 100644
--- a/mojo/public/cpp/bindings/lib/map_internal.h
+++ b/mojo/public/cpp/bindings/lib/map_internal.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_INTERNAL_H_
#include <map>
+#include <utility>
#include "mojo/public/cpp/bindings/array.h"
#include "mojo/public/cpp/bindings/lib/template_util.h"
@@ -144,7 +145,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) {
@@ -188,7 +189,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&

Powered by Google App Engine
This is Rietveld 408576698