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

Unified Diff: mojo/public/cpp/bindings/map_traits_stl.h

Issue 2034273002: Mojo C++ bindings: introduce mojo::WTFMap for blink bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed the code of adding enum key support to WTF::HashMap; which turned out to be non-trivial; wi… Created 4 years, 6 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/map_traits_standard.h ('k') | mojo/public/cpp/bindings/map_traits_wtf.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/map_traits_stl.h
diff --git a/mojo/public/cpp/bindings/map_traits_stl.h b/mojo/public/cpp/bindings/map_traits_stl.h
index 25ae65a8384108e7277bce3e3dfce81543ed8c18..2d5c137ff355d1526a7561d6b64bb6d010309865 100644
--- a/mojo/public/cpp/bindings/map_traits_stl.h
+++ b/mojo/public/cpp/bindings/map_traits_stl.h
@@ -44,11 +44,13 @@ struct MapTraits<std::map<K, V>> {
static V& GetValue(Iterator& iterator) { return iterator->second; }
static const V& GetValue(ConstIterator& iterator) { return iterator->second; }
- static void Insert(std::map<K, V>& input, const K& key, V&& value) {
+ static bool Insert(std::map<K, V>& input, const K& key, V&& value) {
input.insert(std::make_pair(key, std::forward<V>(value)));
+ return true;
}
- static void Insert(std::map<K, V>& input, const K& key, const V& value) {
+ static bool Insert(std::map<K, V>& input, const K& key, const V& value) {
input.insert(std::make_pair(key, value));
+ return true;
}
static void SetToEmpty(std::map<K, V>* output) { output->clear(); }
« no previous file with comments | « mojo/public/cpp/bindings/map_traits_standard.h ('k') | mojo/public/cpp/bindings/map_traits_wtf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698