cdc: generation: schema_tables: use defaulted operator<=>
the default generated operator<=> is exactly the same as the handcrafted one. so let compiler do its job. also, since operator<=> is defaulted, there is no need to define operator== anymore, so drop it as well. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
@@ -108,18 +108,6 @@ bool stream_id::is_set() const {
|
||||
return !_value.empty();
|
||||
}
|
||||
|
||||
bool stream_id::operator==(const stream_id& o) const {
|
||||
return _value == o._value;
|
||||
}
|
||||
|
||||
bool stream_id::operator!=(const stream_id& o) const {
|
||||
return !(*this == o);
|
||||
}
|
||||
|
||||
bool stream_id::operator<(const stream_id& o) const {
|
||||
return _value < o._value;
|
||||
}
|
||||
|
||||
static int64_t bytes_to_int64(bytes_view b, size_t offset) {
|
||||
assert(b.size() >= offset + sizeof(int64_t));
|
||||
int64_t res;
|
||||
|
||||
@@ -56,9 +56,7 @@ public:
|
||||
stream_id(dht::token, size_t);
|
||||
|
||||
bool is_set() const;
|
||||
bool operator==(const stream_id&) const;
|
||||
bool operator!=(const stream_id&) const;
|
||||
bool operator<(const stream_id&) const;
|
||||
auto operator<=>(const stream_id&) const noexcept = default;
|
||||
|
||||
uint8_t version() const;
|
||||
size_t index() const;
|
||||
|
||||
Reference in New Issue
Block a user