Modernize equality operators in //services
This CL is pure clean-up and contains no functionality changes. Depending on the files covered in the CL (since the CL was generated using git cl split), it does a subset of the following: the following: - Remove unneeded operator!= declarations/definitions since C++20 can automatically derive those from operator==. - Default operator== where this is equivalent to the current behavior. - Default operator<=> where this is equivalent to the current behavior. This CL was uploaded by git cl split. R=ryansturm@chromium.org Bug: 40256175 Change-Id: I5cd7a36365142d26f8b097a766f85db5cb4b344d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6538148 Commit-Queue: Ryan Sturm <ryansturm@chromium.org> Reviewed-by: Ryan Sturm <ryansturm@chromium.org> Auto-Submit: Jan Keitel <jkeitel@google.com> Cr-Commit-Position: refs/heads/main@{#1459553}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
6c4a1e7b65
commit
2f160b7cec
@ -153,14 +153,8 @@ struct ResourceScheduler::RequestPriorityParams {
|
||||
RequestPriorityParams(net::RequestPriority priority, int intra_priority)
|
||||
: priority(priority), intra_priority(intra_priority) {}
|
||||
|
||||
bool operator==(const RequestPriorityParams& other) const {
|
||||
return (priority == other.priority) &&
|
||||
(intra_priority == other.intra_priority);
|
||||
}
|
||||
|
||||
bool operator!=(const RequestPriorityParams& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
friend bool operator==(const RequestPriorityParams&,
|
||||
const RequestPriorityParams&) = default;
|
||||
|
||||
bool GreaterThan(const RequestPriorityParams& other) const {
|
||||
if (priority != other.priority)
|
||||
|
Reference in New Issue
Block a user