[Webkit-unassigned] [Bug 192666] New: clang-tidy: Fix unnecessary parameter copies in ParallelHelperPool.cpp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 13 08:37:07 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=192666

            Bug ID: 192666
           Summary: clang-tidy: Fix unnecessary parameter copies in
                    ParallelHelperPool.cpp
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: fpizlo at apple.com, ggaren at apple.com

Running `clang-tidy -checks='-*,performance-*,-performance-noexcept-*' ...` on ParallelHelperPool.cpp found these unnecessary copies:

Source/WTF/wtf/ParallelHelperPool.cpp:36:14: warning: parameter 'pool' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]
    : m_pool(pool)
             ^
             std::move( )
Source/WTF/wtf/ParallelHelperPool.cpp:61:14: warning: parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]
    m_task = task;
             ^
             std::move( )
Source/WTF/wtf/ParallelHelperPool.cpp:86:13: warning: parameter 'task' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]
    setTask(task);
            ^
            std::move( )
Source/WTF/wtf/ParallelHelperPool.cpp:107:64: warning: the parameter 'task' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void ParallelHelperClient::runTask(RefPtr<SharedTask<void ()>> task)
                                                               ^
                                   const                      &

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181213/bb13eb53/attachment.html>


More information about the webkit-unassigned mailing list