Skip to content

Commit

Permalink
'data' can be a reference. Avoids bumping the shared_ptr ref count.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhuggett committed Oct 17, 2024
1 parent 717c86d commit 26a8638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ namespace pstore {
-> sat_iterator {

(void) segment_end; // silence unused argument warning in release build.
std::shared_ptr<void> const data = region->data ();
std::shared_ptr<void> const & data = region->data ();

auto ptr = std::static_pointer_cast<std::uint8_t> (data).get ();
auto const end = ptr + region->size ();
Expand Down

0 comments on commit 26a8638

Please sign in to comment.