Title: [239237] trunk/Source
- Revision
- 239237
- Author
- ddkil...@apple.com
- Date
- 2018-12-14 15:23:10 -0800 (Fri, 14 Dec 2018)
Log Message
clang-tidy: Fix unnecessary copy of objects for operator==() methods
<https://webkit.org/b/192712>
<rdar://problem/46739332>
Reviewed by Andy Estes.
Source/_javascript_Core:
* 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.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (239236 => 239237)
--- trunk/Source/_javascript_Core/ChangeLog 2018-12-14 22:59:36 UTC (rev 239236)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-12-14 23:23:10 UTC (rev 239237)
@@ -1,3 +1,15 @@
+2018-12-14 David Kilzer <ddkil...@apple.com>
+
+ clang-tidy: Fix unnecessary copy of objects for operator==() methods
+ <https://webkit.org/b/192712>
+ <rdar://problem/46739332>
+
+ Reviewed by Andy Estes.
+
+ * 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-14 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r239153, r239154, and r239155.
Modified: trunk/Source/_javascript_Core/b3/air/AirAllocateRegistersByGraphColoring.cpp (239236 => 239237)
--- trunk/Source/_javascript_Core/b3/air/AirAllocateRegistersByGraphColoring.cpp 2018-12-14 22:59:36 UTC (rev 239236)
+++ trunk/Source/_javascript_Core/b3/air/AirAllocateRegistersByGraphColoring.cpp 2018-12-14 23:23:10 UTC (rev 239237)
@@ -466,7 +466,7 @@
return m_value & 0xffffffff;
}
- bool operator==(const InterferenceEdge other) const
+ bool operator==(const InterferenceEdge& other) const
{
return m_value == other.m_value;
}
Modified: trunk/Source/WebCore/ChangeLog (239236 => 239237)
--- trunk/Source/WebCore/ChangeLog 2018-12-14 22:59:36 UTC (rev 239236)
+++ trunk/Source/WebCore/ChangeLog 2018-12-14 23:23:10 UTC (rev 239237)
@@ -1,3 +1,20 @@
+2018-12-14 David Kilzer <ddkil...@apple.com>
+
+ clang-tidy: Fix unnecessary copy of objects for operator==() methods
+ <https://webkit.org/b/192712>
+ <rdar://problem/46739332>
+
+ Reviewed by Andy Estes.
+
+ * 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 Jer Noble <jer.no...@apple.com>
CRASH in CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession(WTF::String const&, WTF::Function<void ()>&&)
Modified: trunk/Source/WebCore/contentextensions/HashableActionList.h (239236 => 239237)
--- trunk/Source/WebCore/contentextensions/HashableActionList.h 2018-12-14 22:59:36 UTC (rev 239236)
+++ trunk/Source/WebCore/contentextensions/HashableActionList.h 2018-12-14 23:23:10 UTC (rev 239237)
@@ -53,12 +53,12 @@
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);
}
Modified: trunk/Source/WebCore/platform/network/FormData.h (239236 => 239237)
--- trunk/Source/WebCore/platform/network/FormData.h 2018-12-14 22:59:36 UTC (rev 239236)
+++ trunk/Source/WebCore/platform/network/FormData.h 2018-12-14 23:23:10 UTC (rev 239237)
@@ -85,7 +85,7 @@
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 EncodedBlobData {
URL url;
- bool operator==(const EncodedBlobData other) const
+ bool operator==(const EncodedBlobData& other) const
{
return url == other.url;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes