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

Unified Diff: mojo/public/cpp/bindings/lib/map_serialization.h

Issue 1683863002: Mojo C++ bindings: make mojo::Map<K,V> more friendly with std::map<K,V>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 | « mojo/public/cpp/bindings/lib/map_internal.h ('k') | mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 054cd5daa93825d85a15c32c9ccdde7f15685025..91210ee60fed9bc57ab354097a64c8e76855dc13 100644
--- a/mojo/public/cpp/bindings/lib/map_serialization.h
+++ b/mojo/public/cpp/bindings/lib/map_serialization.h
@@ -120,10 +120,9 @@ inline size_t GetSerializedSize_(const Map<MapKey, MapValue>& input) {
size_t value_data_size = 0;
for (auto it = input.begin(); it != input.end(); ++it) {
key_data_size +=
- internal::MapSerializer<MapKey, DataKey>::GetItemSize(it.GetKey());
+ internal::MapSerializer<MapKey, DataKey>::GetItemSize(it->first);
value_data_size +=
- internal::MapSerializer<MapValue, DataValue>::GetItemSize(
- it.GetValue());
+ internal::MapSerializer<MapValue, DataValue>::GetItemSize(it->second);
}
return struct_overhead + key_base_size + key_data_size + value_base_size +
« no previous file with comments | « mojo/public/cpp/bindings/lib/map_internal.h ('k') | mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698