Title: [295400] trunk/Source/WTF/wtf/CrossThreadCopier.h
Revision
295400
Author
ddkil...@apple.com
Date
2022-06-08 16:26:55 -0700 (Wed, 08 Jun 2022)

Log Message

WTF::CrossThreadCopierBase::copy() should use std::forward
<https://webkit.org/b/241426>
<rdar://94648592>

Reviewed by Darin Adler.

* Source/WTF/wtf/CrossThreadCopier.h:
(WTF::CrossThreadCopierBase::copy):
- Switch from WTFMove() to std::forward().

Canonical link: https://commits.webkit.org/251406@main

Modified Paths

Diff

Modified: trunk/Source/WTF/wtf/CrossThreadCopier.h (295399 => 295400)


--- trunk/Source/WTF/wtf/CrossThreadCopier.h	2022-06-08 23:16:27 UTC (rev 295399)
+++ trunk/Source/WTF/wtf/CrossThreadCopier.h	2022-06-08 23:26:55 UTC (rev 295400)
@@ -222,7 +222,7 @@
     static std::variant<Types...> copy(Type&& source)
     {
         return std::visit([] (auto&& type) -> std::variant<Types...> {
-            return CrossThreadCopier<std::remove_const_t<std::remove_reference_t<decltype(type)>>>::copy(WTFMove(type));
+            return CrossThreadCopier<std::remove_const_t<std::remove_reference_t<decltype(type)>>>::copy(std::forward<decltype(type)>(type));
         }, WTFMove(source));
     }
 };
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to