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

Unified Diff: third_party/WebKit/Source/wtf/HashMap.h

Issue 2308353002: Replaced PassRefPtr copies with moves in Source/web and Source/wtf. (Closed)
Patch Set: rebased Created 4 years, 3 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
Index: third_party/WebKit/Source/wtf/HashMap.h
diff --git a/third_party/WebKit/Source/wtf/HashMap.h b/third_party/WebKit/Source/wtf/HashMap.h
index 776ccba0eea01f503b60cd67f3b8c90f2b415131..568ece55c547eb9b76d4210570a963024ddf0b18 100644
--- a/third_party/WebKit/Source/wtf/HashMap.h
+++ b/third_party/WebKit/Source/wtf/HashMap.h
@@ -252,7 +252,7 @@ struct HashMapTranslator {
template <typename T, typename U, typename V> static void translate(T& location, U&& key, V&& mapped)
{
location.key = std::forward<U>(key);
- ValueTraits::ValueTraits::store(std::forward<V>(mapped), location.value);
+ ValueTraits::ValueTraits::store(std::move(std::forward<V>(mapped)), location.value);
Yuta Kitamura 2016/09/05 06:46:09 Nesting std::move and std::forward does not make s
Bugs Nash 2016/09/14 05:23:29 Done
}
};
@@ -371,7 +371,7 @@ HashMap<T, U, V, W, X, Y>::set(IncomingKeyType&& key, IncomingMappedType&& mappe
// to set the mapped value.
//
// It's safe to call std::forward again, because |mapped| isn't moved if there's an existing entry.
- MappedTraits::store(std::forward<IncomingMappedType>(mapped), result.storedValue->value);
+ MappedTraits::store(std::move(std::forward<IncomingMappedType>(mapped)), result.storedValue->value);
Yuta Kitamura 2016/09/05 06:46:09 Ditto.
Bugs Nash 2016/09/14 05:23:29 Done
}
return result;
}
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/Source/wtf/typed_arrays/Float32Array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698