Move hashes collection to TorrentRead

So yeah, while TorrentRead is not compulsory to use,
right now it'd be pretty inconvenient to not use it
as the hash grouping function is fidgety to get right.
I think group_torrent_hashes() eventually should be
moved elsewhere.
This commit is contained in:
King_DuckZ 2025-04-07 01:19:56 +01:00
commit f7d90a789d
5 changed files with 41 additions and 39 deletions

View file

@ -21,8 +21,6 @@
#include <boost/spirit/home/x3/support/ast/variant.hpp>
#include <map>
#include <vector>
#include <array>
#include <cstdint>
#include <stdexcept>
namespace duck {
@ -46,6 +44,4 @@ struct TorrentValue : public boost::spirit::x3::variant<
};
std::vector<TorrentValue> parse_torrent (std::string_view binary_data);
std::vector<std::array<std::uint32_t, 5>> collect_hashes (std::string_view hashes);
std::vector<std::array<std::uint32_t, 5>> collect_hashes (const std::vector<TorrentValue>& values);
} //namespace duck