From 8a0991d2f643055f6a3b6a5c5dc38c2441c1ef12 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Sun, 1 Sep 2024 21:28:45 +0200 Subject: [PATCH] db: fix clang tidy and windows build after PR 2279 (#2288) --- silkworm/db/snapshots/bittorrent/client.cpp | 2 +- silkworm/db/snapshots/bittorrent/client_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/silkworm/db/snapshots/bittorrent/client.cpp b/silkworm/db/snapshots/bittorrent/client.cpp index d3bb34a4f0..947da6eb29 100644 --- a/silkworm/db/snapshots/bittorrent/client.cpp +++ b/silkworm/db/snapshots/bittorrent/client.cpp @@ -84,7 +84,7 @@ BitTorrentClient::~BitTorrentClient() { } void BitTorrentClient::add_info_hash(std::string_view name, std::string_view info_hash) { - add_info_hash(std::move(name), std::move(info_hash), kBestTrackers); + add_info_hash(name, info_hash, kBestTrackers); } void BitTorrentClient::add_info_hash(std::string_view name, std::string_view info_hash, std::vector trackers) { diff --git a/silkworm/db/snapshots/bittorrent/client_test.cpp b/silkworm/db/snapshots/bittorrent/client_test.cpp index e7281ad7fe..80a8091ca4 100644 --- a/silkworm/db/snapshots/bittorrent/client_test.cpp +++ b/silkworm/db/snapshots/bittorrent/client_test.cpp @@ -245,7 +245,7 @@ TEST_CASE("BitTorrentClient::handle_alert", "[silkworm][snapshot][bittorrent]") BitTorrentClientForTest client{settings}; lt::aux::stack_allocator allocator; lt::add_torrent_params params = lt::parse_magnet_uri("magnet:?xt=urn:btih:df09957d8a28af3bc5137478885a8003677ca878"); - params.save_path = settings.repository_path; + params.save_path = settings.repository_path.string(); lt::torrent_handle handle = client.add_torrent(params); SECTION("lt::add_torrent_alert is handled") {