Skip to content

Commit 235e638

Browse files
author
Conor
committed
tidy
1 parent 87aefb8 commit 235e638

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/batteries/geometric_stack.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class geometric_stack {
107107
LF_ASSUME(push_bytes >= node_size);
108108
LF_ASSUME(push_bytes % node_size == 0);
109109

110-
// Optimized to just the subtrtaction because multiplication cancels the implicit division.
110+
// Optimized to just the subtraction because multiplication cancels the implicit division.
111111
diff_int free_bytes = node_size * (m_hi - m_sp);
112112

113113
if (push_bytes > free_bytes) [[unlikely]] {
@@ -148,7 +148,7 @@ class geometric_stack {
148148
}
149149

150150
[[nodiscard]]
151-
constexpr auto prepare_release() const noexcept -> release_t {
151+
constexpr auto prepare_release() noexcept -> release_t {
152152

153153
// Guard against null release
154154
if (m_ctrl != nullptr) {

src/batteries/slab_stack.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class slab_stack {
138138
}
139139

140140
[[nodiscard]]
141-
constexpr auto prepare_release() const noexcept -> release_t {
141+
constexpr auto prepare_release() noexcept -> release_t {
142142
// Guard against null ctrl (failed prior allocation in release()).
143143
if (m_ctrl != nullptr) {
144144
m_ctrl->sp_cache = m_sp;
@@ -165,6 +165,7 @@ class slab_stack {
165165

166166
constexpr void acquire(checkpoint_t ckpt) noexcept {
167167
LF_ASSUME(empty());
168+
LF_ASSUME(ckpt.m_ctrl != m_ctrl);
168169

169170
if (ckpt.m_ctrl == nullptr) {
170171
return;

0 commit comments

Comments
 (0)