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:
Kefu Chai
2023-02-28 17:21:38 +08:00
parent 56c9c9d29e
commit aed681fa3c
2 changed files with 1 additions and 15 deletions

View File

@@ -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;

View File

@@ -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;