Skip to content

Commit

Permalink
Use const reference for a structured binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Toasterbirb committed Aug 20, 2024
1 parent 31a3b68 commit c17e45b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ namespace harava
if (cancel_search)
return;

auto [region_id, region] = memory_region;
const auto& [region_id, region] = memory_region;

std::ifstream mem(mem_path, std::ios::in | std::ios::binary);
std::vector<u8> bytes = read_region(mem, region.start, region.end);
Expand Down

0 comments on commit c17e45b

Please sign in to comment.