WebKit Bugzilla
Attachment 357340 Details for
Bug 192712
: clang-tidy: Fix unnecessary copy of objects for operator==() methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-192712-20181214134434.patch (text/plain), 4.49 KB, created by
David Kilzer (:ddkilzer)
on 2018-12-14 13:44:35 PST
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2018-12-14 13:44:35 PST
Size:
4.49 KB
patch
obsolete
>Subversion Revision: 239112 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index dfa8c2fb4732c6bec52f609180e93f274ae89805..e055d3709e90c9f8560aac205d5eaf5dbe8fa26c 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,15 @@ >+2018-12-14 David Kilzer <ddkilzer@apple.com> >+ >+ clang-tidy: Fix unnecessary copy of objects for operator==() methods >+ <https://webkit.org/b/192712> >+ <rdar://problem/46739332> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * b3/air/AirAllocateRegistersByGraphColoring.cpp: >+ (JSC::B3::Air::(anonymous namespace)::AbstractColoringAllocator::InterferenceEdge::operator==): >+ - Change argument from const to const reference to avoid a copy. >+ > 2018-12-13 David Kilzer <ddkilzer@apple.com> > > clang-tidy: Fix unnecessary object copies in JavaScriptCore >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index d2d8769ee44e03bffea9bf9171317d0c4e65d010..0e00ebb6c25a3e0c919fea431cc6fe064b7387b4 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2018-12-14 David Kilzer <ddkilzer@apple.com> >+ >+ clang-tidy: Fix unnecessary copy of objects for operator==() methods >+ <https://webkit.org/b/192712> >+ <rdar://problem/46739332> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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. >+ > 2018-12-14 David Kilzer <ddkilzer@apple.com> > > clang-tidy: Fix unnecessary object copies in WebCore/platform/graphics/avfoundation/objc/ >diff --git a/Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp b/Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp >index 26acffc77926a65e6ecccf786ed6e1206818555d..c282d5005d666cfdf9e17e4a956c1683ed450216 100644 >--- a/Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp >+++ b/Source/JavaScriptCore/b3/air/AirAllocateRegistersByGraphColoring.cpp >@@ -466,7 +466,7 @@ protected: > return m_value & 0xffffffff; > } > >- bool operator==(const InterferenceEdge other) const >+ bool operator==(const InterferenceEdge& other) const > { > return m_value == other.m_value; > } >diff --git a/Source/WebCore/contentextensions/HashableActionList.h b/Source/WebCore/contentextensions/HashableActionList.h >index 1039c1da5d64d7f98dd65b8e859c38feda37106d..8875703e19ed94861b4c078260856a7094e1c30b 100644 >--- a/Source/WebCore/contentextensions/HashableActionList.h >+++ b/Source/WebCore/contentextensions/HashableActionList.h >@@ -53,12 +53,12 @@ struct HashableActionList { > bool isEmptyValue() const { return state == Empty; } > bool isDeletedValue() const { return state == Deleted; } > >- bool operator==(const HashableActionList other) const >+ bool operator==(const HashableActionList& other) const > { > return state == other.state && actions == other.actions; > } > >- bool operator!=(const HashableActionList other) const >+ bool operator!=(const HashableActionList& other) const > { > return !(*this == other); > } >diff --git a/Source/WebCore/platform/network/FormData.h b/Source/WebCore/platform/network/FormData.h >index 59f55f8338bdbe5e240fc45e05485f5c23fabad1..d7c1e5faa0de50783bfb47724bf59919ab66f91d 100644 >--- a/Source/WebCore/platform/network/FormData.h >+++ b/Source/WebCore/platform/network/FormData.h >@@ -85,7 +85,7 @@ struct FormDataElement { > return { filename.isolatedCopy(), fileStart, fileLength, expectedFileModificationTime, generatedFilename.isolatedCopy(), shouldGenerateFile, ownsGeneratedFile }; > } > >- bool operator==(const EncodedFileData other) const >+ bool operator==(const EncodedFileData& other) const > { > return filename == other.filename > && fileStart == other.fileStart >@@ -149,7 +149,7 @@ struct FormDataElement { > struct EncodedBlobData { > URL url; > >- bool operator==(const EncodedBlobData other) const >+ bool operator==(const EncodedBlobData& other) const > { > return url == other.url; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192712
: 357340