Skip to content

Commit

Permalink
Retry emplace_back.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jun 21, 2024
1 parent 1917776 commit 0a6330b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/messages/headers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ inventory_items headers::to_inventory(inventory::type_id type) const NOEXCEPT
inventory_items out;
out.reserve(header_ptrs.size());

// msvc: emplace_back(type, header->hash()) does not compile.
for (const auto& header: header_ptrs)
out.push_back({ type, header->hash() });
out.emplace_back(type, header->hash());

return out;
}
Expand Down

0 comments on commit 0a6330b

Please sign in to comment.