Skip to content

Commit

Permalink
Merge pull request #637 from thompsonbry/scan_fixups_01
Browse files Browse the repository at this point in the history
Removes an unused operator==() implementation and adds some documentation
  • Loading branch information
laurynas-biveinis authored Jan 14, 2025
2 parents 8acb4fb + fd3754b commit b0a64b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions olc_art.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ struct [[nodiscard]] olc_node_header {
}

#ifndef NDEBUG
// This is passed as a debug callback to QSBR deallocation to be
// checked at the physical deallocation time. This checks that the
// node being deallocated has no open RCS (read_critical_section).
static void check_on_dealloc(const void* ptr) noexcept {
static_cast<const olc_node_header*>(ptr)->m_lock.check_on_dealloc();
}
Expand Down
6 changes: 0 additions & 6 deletions optimistic_lock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,6 @@ class [[nodiscard]] optimistic_lock final {
return *this;
}

// Point to the same lock and have the same version for that lock.
[[nodiscard]] bool operator==(
const read_critical_section &other) const noexcept {
return lock == other.lock && version == other.version;
}

// Unlock iff it is not yet unlocked. The read_critical_section
// is invalidated by this method and must not be used again by the
// caller.
Expand Down

0 comments on commit b0a64b4

Please sign in to comment.