From cb1a77db98fff46974c1e11c9ca511d2a1a62c39 Mon Sep 17 00:00:00 2001 From: jbajic <jure.bajic@memgraph.com> Date: Tue, 21 Feb 2023 14:29:13 +0100 Subject: [PATCH] Add noexcept to spaceship operator in hlc --- src/coordinator/hybrid_logical_clock.hpp | 2 +- src/storage/v3/delta.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coordinator/hybrid_logical_clock.hpp b/src/coordinator/hybrid_logical_clock.hpp index 2fe4880b7..e8ea30e6b 100644 --- a/src/coordinator/hybrid_logical_clock.hpp +++ b/src/coordinator/hybrid_logical_clock.hpp @@ -27,7 +27,7 @@ struct Hlc final { uint64_t logical_id{0}; 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; diff --git a/src/storage/v3/delta.hpp b/src/storage/v3/delta.hpp index 8c1b85ab5..555a6a151 100644 --- a/src/storage/v3/delta.hpp +++ b/src/storage/v3/delta.hpp @@ -29,7 +29,7 @@ struct Edge; struct Delta; struct CommitInfo; -inline uint64_t GetNextDeltaId() noexcept { +inline uint64_t GetNextDeltaId() { static utils::Synchronized<uint64_t, utils::SpinLock> delta_id{0}; return delta_id.WithLock([](auto &id) { return id++; }); }