[Webkit-unassigned] [Bug 192712] New: clang-tidy: Fix unnecessary copy of objects for operator==() methods

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 14 13:06:24 PST 2018


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

            Bug ID: 192712
           Summary: clang-tidy: Fix unnecessary copy of objects for
                    operator==() methods
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: aestes at apple.com, wenson_hsieh at apple.com

Running `clang-tidy -header-filter=.* -checks='-*,performance-*,-performance-noexcept-*' ...` on WebCore source files found these unnecessary object copies:

Source/WebCore/contentextensions/HashableActionList.h:56:46: warning: the const qualified parameter 'other' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
    bool operator==(const HashableActionList other) const
                                             ^
                                            &
Source/WebCore/contentextensions/HashableActionList.h:61:46: warning: the const qualified parameter 'other' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
    bool operator!=(const HashableActionList other) const
                                             ^
                                            &

Source/WebCore/platform/network/FormData.h:88:47: warning: the const qualified parameter 'other' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
        bool operator==(const EncodedFileData other) const
                                              ^
                                             &
Source/WebCore/platform/network/FormData.h:152:47: warning: the const qualified parameter 'other' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
        bool operator==(const EncodedBlobData other) 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/20181214/b6711176/attachment.html>


More information about the webkit-unassigned mailing list