mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
cls/fifo: Use spaceship operator to implement comparisons
Except for the version type, where only versions with the same tag are comparable. Fixes: https://tracker.ceph.com/issues/57562 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This commit is contained in:
parent
f89a6d1833
commit
9e67a437a3
@ -105,11 +105,7 @@ struct data_params {
|
||||
void dump(ceph::Formatter* f) const;
|
||||
void decode_json(JSONObj* obj);
|
||||
|
||||
bool operator ==(const data_params& rhs) const {
|
||||
return (max_part_size == rhs.max_part_size &&
|
||||
max_entry_size == rhs.max_entry_size &&
|
||||
full_size_threshold == rhs.full_size_threshold);
|
||||
}
|
||||
auto operator <=>(const data_params&) const = default;
|
||||
};
|
||||
WRITE_CLASS_ENCODER(data_params)
|
||||
inline std::ostream& operator <<(std::ostream& m, const data_params& d) {
|
||||
@ -152,10 +148,7 @@ struct journal_entry {
|
||||
}
|
||||
void dump(ceph::Formatter* f) const;
|
||||
|
||||
friend bool operator ==(const journal_entry& lhs, const journal_entry& rhs) {
|
||||
return (lhs.op == rhs.op &&
|
||||
lhs.part_num == rhs.part_num);
|
||||
}
|
||||
auto operator <=>(const journal_entry&) const = default;
|
||||
};
|
||||
WRITE_CLASS_ENCODER(journal_entry)
|
||||
inline std::ostream& operator <<(std::ostream& m, const journal_entry::Op& o) {
|
||||
|
Loading…
Reference in New Issue
Block a user