Skip to content

Commit

Permalink
CR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyastolfi committed May 28, 2024
1 parent 2252bb3 commit b0fff52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/llfs/basic_log_storage_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,8 @@ class BasicLogStorageReader : public LogDevice::Reader

void refresh_view(slot_offset_type upper_bound)
{
this->data_ = [&] {
ConstBuffer b = this->context_.buffer_.get(this->offset_);

return ConstBuffer{b.data(), slot_clamp_distance(this->offset_, upper_bound)};
}();
const ConstBuffer b = this->context_.buffer_.get(this->offset_);
this->data_ = ConstBuffer{b.data(), slot_clamp_distance(this->offset_, upper_bound)};
}

//==#==========+==+=+=++=+++++++++++-+-+--+----- --- -- - - - -
Expand Down
2 changes: 1 addition & 1 deletion src/llfs/slot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ inline isize slot_difference(slot_offset_type x, slot_offset_type y)
inline usize slot_abs_distance(slot_offset_type x, slot_offset_type y)
{
if (slot_less_than(y, x)) {
return slot_abs_distance(y, x);
return x - y;
}
return y - x;
}
Expand Down

0 comments on commit b0fff52

Please sign in to comment.