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

Unified Diff: mojo/public/cpp/bindings/lib/map_serialization.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_serialization.h
diff --git a/mojo/public/cpp/bindings/lib/map_serialization.h b/mojo/public/cpp/bindings/lib/map_serialization.h
index b3268720a23eded608f58072a7d62a3e65683763..f00cb3e9048a99ba62496c3ab5b914d6be586bbf 100644
--- a/mojo/public/cpp/bindings/lib/map_serialization.h
+++ b/mojo/public/cpp/bindings/lib/map_serialization.h
@@ -5,6 +5,8 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_MAP_SERIALIZATION_H_
+#include <utility>
+
#include "mojo/public/cpp/bindings/lib/array_internal.h"
#include "mojo/public/cpp/bindings/lib/map_data_internal.h"
#include "mojo/public/cpp/bindings/lib/map_internal.h"
@@ -148,8 +150,9 @@ inline void SerializeMap_(
input.DecomposeMapTo(&keys, &values);
const internal::ArrayValidateParams* key_validate_params =
internal::MapKeyValidateParamsFactory<DataKey>::Get();
- SerializeArray_(keys.Pass(), buf, &result->keys.ptr, key_validate_params);
- SerializeArray_(values.Pass(), buf, &result->values.ptr,
+ SerializeArray_(std::move(keys), buf, &result->keys.ptr,
+ key_validate_params);
+ SerializeArray_(std::move(values), buf, &result->values.ptr,
value_validate_params);
}
*output = result;
@@ -178,7 +181,7 @@ inline bool Deserialize_(internal::Map_Data<DataKey, DataValue>* input,
if (!Deserialize_(input->values.ptr, &values, context))
success = false;
- *output = Map<MapKey, MapValue>(keys.Pass(), values.Pass());
+ *output = Map<MapKey, MapValue>(std::move(keys), std::move(values));
} else {
output->reset();
}

Powered by Google App Engine
This is Rietveld 408576698