Changeset 239237 in webkit


Ignore:
Timestamp:
Dec 14, 2018 3:23:10 PM (5 years ago)
Author:
ddkilzer@apple.com
Message:

clang-tidy: Fix unnecessary copy of objects for operator==() methods
<https://webkit.org/b/192712>
<rdar://problem/46739332>

Reviewed by Andy Estes.

Source/JavaScriptCore:

  • b3/air/AirAllocateRegistersByGraphColoring.cpp:

(JSC::B3::Air::(anonymous namespace)::AbstractColoringAllocator::InterferenceEdge::operator==):

  • Change argument from const to const reference to avoid a copy.

Source/WebCore:

  • contentextensions/HashableActionList.h:

(WebCore::ContentExtensions::HashableActionList::operator== const):
(WebCore::ContentExtensions::HashableActionList::operator!= const):

  • platform/network/FormData.h:

(WebCore::FormDataElement::EncodedFileData::operator== const):
(WebCore::FormDataElement::EncodedBlobData::operator== const):

  • Change arguments from const to const reference to avoid copies.
Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r239231 r239237  
     12018-12-14  David Kilzer  <ddkilzer@apple.com>
     2
     3        clang-tidy: Fix unnecessary copy of objects for operator==() methods
     4        <https://webkit.org/b/192712>
     5        <rdar://problem/46739332>
     6
     7        Reviewed by Andy Estes.
     8
     9        * b3/air/AirAllocateRegistersByGraphColoring.cpp:
     10        (JSC::B3::Air::(anonymous namespace)::AbstractColoringAllocator::InterferenceEdge::operator==):
     11        - Change argument from const to const reference to avoid a copy.
     12
    1132018-12-14  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp

    r219648 r239237  
    467467        }
    468468
    469         bool operator==(const InterferenceEdge other) const
     469        bool operator==(const InterferenceEdge& other) const
    470470        {
    471471            return m_value == other.m_value;
  • trunk/Source/WebCore/ChangeLog

    r239236 r239237  
     12018-12-14  David Kilzer  <ddkilzer@apple.com>
     2
     3        clang-tidy: Fix unnecessary copy of objects for operator==() methods
     4        <https://webkit.org/b/192712>
     5        <rdar://problem/46739332>
     6
     7        Reviewed by Andy Estes.
     8
     9        * contentextensions/HashableActionList.h:
     10        (WebCore::ContentExtensions::HashableActionList::operator== const):
     11        (WebCore::ContentExtensions::HashableActionList::operator!= const):
     12        * platform/network/FormData.h:
     13        (WebCore::FormDataElement::EncodedFileData::operator== const):
     14        (WebCore::FormDataElement::EncodedBlobData::operator== const):
     15        - Change arguments from const to const reference to avoid
     16          copies.
     17
    1182018-12-14  Jer Noble  <jer.noble@apple.com>
    219
  • trunk/Source/WebCore/contentextensions/HashableActionList.h

    r208179 r239237  
    5454    bool isDeletedValue() const { return state == Deleted; }
    5555
    56     bool operator==(const HashableActionList other) const
     56    bool operator==(const HashableActionList& other) const
    5757    {
    5858        return state == other.state && actions == other.actions;
    5959    }
    6060
    61     bool operator!=(const HashableActionList other) const
     61    bool operator!=(const HashableActionList& other) const
    6262    {
    6363        return !(*this == other);
  • trunk/Source/WebCore/platform/network/FormData.h

    r238802 r239237  
    8686        }
    8787       
    88         bool operator==(const EncodedFileData other) const
     88        bool operator==(const EncodedFileData& other) const
    8989        {
    9090            return filename == other.filename
     
    150150        URL url;
    151151
    152         bool operator==(const EncodedBlobData other) const
     152        bool operator==(const EncodedBlobData& other) const
    153153        {
    154154            return url == other.url;
Note: See TracChangeset for help on using the changeset viewer.