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

Unified Diff: mojo/public/cpp/bindings/map.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/map.h
diff --git a/mojo/public/cpp/bindings/map.h b/mojo/public/cpp/bindings/map.h
index 0f08d838bb85e2ba16a73d0a462ff314603f6bda..2449ea99f360bf2ced4ccaab2b2ee2516cb78d0f 100644
--- a/mojo/public/cpp/bindings/map.h
+++ b/mojo/public/cpp/bindings/map.h
@@ -6,6 +6,7 @@
#define MOJO_PUBLIC_CPP_BINDINGS_MAP_H_
#include <map>
+#include <utility>
#include "mojo/public/cpp/bindings/lib/map_internal.h"
#include "mojo/public/cpp/bindings/lib/value_traits.h"
@@ -53,7 +54,7 @@ class Map {
// corresponding |values|.
Map(mojo::Array<Key> keys, mojo::Array<Value> values) : is_null_(false) {
MOJO_DCHECK(keys.size() == values.size());
- Traits::InitializeFrom(&map_, keys.Pass(), values.Pass());
+ Traits::InitializeFrom(&map_, std::move(keys), std::move(values));
}
~Map() { Traits::Finalize(&map_); }
@@ -156,7 +157,7 @@ class Map {
Map result;
result.is_null_ = is_null_;
Traits::Clone(map_, &result.map_);
- return result.Pass();
+ return std::move(result);
}
// Indicates whether the contents of this map are equal to those of another
@@ -266,7 +267,7 @@ struct TypeConverter<Map<MojoKey, MojoValue>, std::map<STLKey, STLValue>> {
result.insert(TypeConverter<MojoKey, STLKey>::Convert(pair.first),
TypeConverter<MojoValue, STLValue>::Convert(pair.second));
}
- return result.Pass();
+ return std::move(result);
}
};

Powered by Google App Engine
This is Rietveld 408576698