Title: [281270] trunk/Source/WTF
Revision
281270
Author
[email protected]
Date
2021-08-19 14:25:12 -0700 (Thu, 19 Aug 2021)

Log Message

[WTF] Fix static analyzer warnings for clang tidy bugprone-move-forwarding-reference checker
<https://webkit.org/b/229114>

Reviewed by Darin Adler.

* wtf/Deque.h:
(WTF::inlineCapacity>::appendAndBubble):
* wtf/Scope.h:
(WTF::ScopeExit::ScopeExit):
* wtf/ScopedLambda.h:
(WTF::scopedLambda):
* wtf/SharedTask.h:
(WTF::createSharedTask):
- Replace WTFMove() with std::forward<>().

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (281269 => 281270)


--- trunk/Source/WTF/ChangeLog	2021-08-19 20:50:17 UTC (rev 281269)
+++ trunk/Source/WTF/ChangeLog	2021-08-19 21:25:12 UTC (rev 281270)
@@ -1,3 +1,20 @@
+2021-08-19  David Kilzer  <[email protected]>
+
+        [WTF] Fix static analyzer warnings for clang tidy bugprone-move-forwarding-reference checker
+        <https://webkit.org/b/229114>
+
+        Reviewed by Darin Adler.
+
+        * wtf/Deque.h:
+        (WTF::inlineCapacity>::appendAndBubble):
+        * wtf/Scope.h:
+        (WTF::ScopeExit::ScopeExit):
+        * wtf/ScopedLambda.h:
+        (WTF::scopedLambda):
+        * wtf/SharedTask.h:
+        (WTF::createSharedTask):
+        - Replace WTFMove() with std::forward<>().
+
 2021-08-19  Alex Christensen  <[email protected]>
 
         Remove more non-inclusive language from Source

Modified: trunk/Source/WTF/wtf/Deque.h (281269 => 281270)


--- trunk/Source/WTF/wtf/Deque.h	2021-08-19 20:50:17 UTC (rev 281269)
+++ trunk/Source/WTF/wtf/Deque.h	2021-08-19 21:25:12 UTC (rev 281270)
@@ -575,7 +575,7 @@
 template<typename U, typename Func>
 inline void Deque<T, inlineCapacity>::appendAndBubble(U&& value, const Func& func)
 {
-    append(WTFMove(value));
+    append(std::forward<U>(value));
     iterator begin = this->begin();
     iterator iter = end();
     --iter;

Modified: trunk/Source/WTF/wtf/Scope.h (281269 => 281270)


--- trunk/Source/WTF/wtf/Scope.h	2021-08-19 20:50:17 UTC (rev 281269)
+++ trunk/Source/WTF/wtf/Scope.h	2021-08-19 21:25:12 UTC (rev 281270)
@@ -37,7 +37,7 @@
 public:
     template<typename ExitFunctionParameter>
     explicit ScopeExit(ExitFunctionParameter&& exitFunction)
-        : m_exitFunction(WTFMove(exitFunction))
+        : m_exitFunction(std::forward<ExitFunctionParameter>(exitFunction))
     {
     }
 

Modified: trunk/Source/WTF/wtf/ScopedLambda.h (281269 => 281270)


--- trunk/Source/WTF/wtf/ScopedLambda.h	2021-08-19 20:50:17 UTC (rev 281269)
+++ trunk/Source/WTF/wtf/ScopedLambda.h	2021-08-19 21:25:12 UTC (rev 281270)
@@ -125,7 +125,7 @@
 template<typename FunctionType, typename Functor>
 ScopedLambdaFunctor<FunctionType, Functor> scopedLambda(Functor&& functor)
 {
-    return ScopedLambdaFunctor<FunctionType, Functor>(WTFMove(functor));
+    return ScopedLambdaFunctor<FunctionType, Functor>(std::forward<Functor>(functor));
 }
 
 template<typename FunctionType, typename Functor> class ScopedLambdaRefFunctor;

Modified: trunk/Source/WTF/wtf/SharedTask.h (281269 => 281270)


--- trunk/Source/WTF/wtf/SharedTask.h	2021-08-19 20:50:17 UTC (rev 281269)
+++ trunk/Source/WTF/wtf/SharedTask.h	2021-08-19 21:25:12 UTC (rev 281270)
@@ -119,7 +119,7 @@
 template<typename FunctionType, typename Functor>
 Ref<SharedTask<FunctionType>> createSharedTask(Functor&& functor)
 {
-    return adoptRef(*new SharedTaskFunctor<FunctionType, Functor>(WTFMove(functor)));
+    return adoptRef(*new SharedTaskFunctor<FunctionType, Functor>(std::forward<Functor>(functor)));
 }
 
 } // namespace WTF
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to