Add noexcept to spaceship operator in hlc
This commit is contained in:
parent
177de2fa2e
commit
cb1a77db98
@ -27,7 +27,7 @@ struct Hlc final {
|
|||||||
uint64_t logical_id{0};
|
uint64_t logical_id{0};
|
||||||
Time coordinator_wall_clock = Time::min();
|
Time coordinator_wall_clock = Time::min();
|
||||||
|
|
||||||
auto operator<=>(const Hlc &other) const { return logical_id <=> other.logical_id; }
|
auto operator<=>(const Hlc &other) const noexcept { return logical_id <=> other.logical_id; }
|
||||||
|
|
||||||
bool operator==(const Hlc &other) const noexcept = default;
|
bool operator==(const Hlc &other) const noexcept = default;
|
||||||
bool operator<(const Hlc &other) const noexcept = default;
|
bool operator<(const Hlc &other) const noexcept = default;
|
||||||
|
@ -29,7 +29,7 @@ struct Edge;
|
|||||||
struct Delta;
|
struct Delta;
|
||||||
struct CommitInfo;
|
struct CommitInfo;
|
||||||
|
|
||||||
inline uint64_t GetNextDeltaId() noexcept {
|
inline uint64_t GetNextDeltaId() {
|
||||||
static utils::Synchronized<uint64_t, utils::SpinLock> delta_id{0};
|
static utils::Synchronized<uint64_t, utils::SpinLock> delta_id{0};
|
||||||
return delta_id.WithLock([](auto &id) { return id++; });
|
return delta_id.WithLock([](auto &id) { return id++; });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user