Title: [289162] trunk/Source/WTF
- Revision
- 289162
- Author
- [email protected]
- Date
- 2022-02-05 15:39:04 -0800 (Sat, 05 Feb 2022)
Log Message
[WTF] Fix clang tidy bugprone-move-forwarding-reference static analyzer warnings in CompletionHandler.h
<https://webkit.org/b/236181>
<rdar://problem/88529996>
Reviewed by Chris Dumez.
* wtf/CompletionHandler.h:
(WTF::CompletionHandler<Out):
(WTF::CompletionHandlerWithFinalizer<Out):
- Replace WTFMove() with std::forward<>().
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (289161 => 289162)
--- trunk/Source/WTF/ChangeLog 2022-02-05 21:25:27 UTC (rev 289161)
+++ trunk/Source/WTF/ChangeLog 2022-02-05 23:39:04 UTC (rev 289162)
@@ -1,3 +1,16 @@
+2022-02-05 David Kilzer <[email protected]>
+
+ [WTF] Fix clang tidy bugprone-move-forwarding-reference static analyzer warnings in CompletionHandler.h
+ <https://webkit.org/b/236181>
+ <rdar://problem/88529996>
+
+ Reviewed by Chris Dumez.
+
+ * wtf/CompletionHandler.h:
+ (WTF::CompletionHandler<Out):
+ (WTF::CompletionHandlerWithFinalizer<Out):
+ - Replace WTFMove() with std::forward<>().
+
2022-02-05 Yusuke Suzuki <[email protected]>
Thread suspend and resume should take a global lock to avoid deadlock
Modified: trunk/Source/WTF/wtf/CompletionHandler.h (289161 => 289162)
--- trunk/Source/WTF/wtf/CompletionHandler.h 2022-02-05 21:25:27 UTC (rev 289161)
+++ trunk/Source/WTF/wtf/CompletionHandler.h 2022-02-05 23:39:04 UTC (rev 289162)
@@ -43,7 +43,7 @@
template<typename CallableType, class = typename std::enable_if<std::is_rvalue_reference<CallableType&&>::value>::type>
CompletionHandler(CallableType&& callable, CompletionHandlerCallThread callThread = CompletionHandlerCallThread::ConstructionThread)
- : m_function(WTFMove(callable))
+ : m_function(std::forward<CallableType>(callable))
#if ASSERT_ENABLED
, m_shouldBeCalledOnMainThread(callThread == CompletionHandlerCallThread::MainThread || isMainThread())
#endif
@@ -85,7 +85,7 @@
public:
template<typename CallableType, class = typename std::enable_if<std::is_rvalue_reference<CallableType&&>::value>::type>
CompletionHandlerWithFinalizer(CallableType&& callable, Function<void(Function<Out(In...)>&)>&& finalizer)
- : m_function(WTFMove(callable))
+ : m_function(std::forward<CallableType>(callable))
, m_finalizer(WTFMove(finalizer))
{
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes