Browse Source

Use upstream defined namespace

`lt` namespace is defined since libtorrent 1.1.6 and our master branch requires >= 1.1.10,
so there is no need to add #if condition for it.
adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
677a419f0b
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 5
      src/base/bittorrent/magneturi.cpp
  2. 55
      src/base/bittorrent/peerinfo.cpp
  3. 40
      src/base/bittorrent/private/filterparserthread.cpp
  4. 673
      src/base/bittorrent/session.cpp
  5. 23
      src/base/bittorrent/torrentcreatorthread.cpp
  6. 23
      src/base/bittorrent/torrentinfo.cpp

5
src/base/bittorrent/magneturi.cpp

@ -56,7 +56,6 @@ namespace
} }
} }
namespace libt = libtorrent;
using namespace BitTorrent; using namespace BitTorrent;
MagnetUri::MagnetUri(const QString &source) MagnetUri::MagnetUri(const QString &source)
@ -68,8 +67,8 @@ MagnetUri::MagnetUri(const QString &source)
if (isBitTorrentInfoHash(source)) if (isBitTorrentInfoHash(source))
m_url = QLatin1String("magnet:?xt=urn:btih:") + source; m_url = QLatin1String("magnet:?xt=urn:btih:") + source;
libt::error_code ec; lt::error_code ec;
libt::parse_magnet_uri(m_url.toStdString(), m_addTorrentParams, ec); lt::parse_magnet_uri(m_url.toStdString(), m_addTorrentParams, ec);
if (ec) return; if (ec) return;
m_valid = true; m_valid = true;

55
src/base/bittorrent/peerinfo.cpp

@ -33,7 +33,6 @@
#include "base/unicodestrings.h" #include "base/unicodestrings.h"
#include "base/utils/string.h" #include "base/utils/string.h"
namespace libt = libtorrent;
using namespace BitTorrent; using namespace BitTorrent;
// PeerAddress // PeerAddress
@ -51,7 +50,7 @@ PeerAddress::PeerAddress(const QHostAddress &ip, ushort port)
// PeerInfo // PeerInfo
PeerInfo::PeerInfo(const TorrentHandle *torrent, const libt::peer_info &nativeInfo) PeerInfo::PeerInfo(const TorrentHandle *torrent, const lt::peer_info &nativeInfo)
: m_nativeInfo(nativeInfo) : m_nativeInfo(nativeInfo)
{ {
calcRelevance(torrent); calcRelevance(torrent);
@ -60,17 +59,17 @@ PeerInfo::PeerInfo(const TorrentHandle *torrent, const libt::peer_info &nativeIn
bool PeerInfo::fromDHT() const bool PeerInfo::fromDHT() const
{ {
return static_cast<bool>(m_nativeInfo.source & libt::peer_info::dht); return static_cast<bool>(m_nativeInfo.source & lt::peer_info::dht);
} }
bool PeerInfo::fromPeX() const bool PeerInfo::fromPeX() const
{ {
return static_cast<bool>(m_nativeInfo.source & libt::peer_info::pex); return static_cast<bool>(m_nativeInfo.source & lt::peer_info::pex);
} }
bool PeerInfo::fromLSD() const bool PeerInfo::fromLSD() const
{ {
return static_cast<bool>(m_nativeInfo.source & libt::peer_info::lsd); return static_cast<bool>(m_nativeInfo.source & lt::peer_info::lsd);
} }
#ifndef DISABLE_COUNTRIES_RESOLUTION #ifndef DISABLE_COUNTRIES_RESOLUTION
@ -82,102 +81,102 @@ QString PeerInfo::country() const
bool PeerInfo::isInteresting() const bool PeerInfo::isInteresting() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::interesting); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::interesting);
} }
bool PeerInfo::isChocked() const bool PeerInfo::isChocked() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::choked); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::choked);
} }
bool PeerInfo::isRemoteInterested() const bool PeerInfo::isRemoteInterested() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::remote_interested); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::remote_interested);
} }
bool PeerInfo::isRemoteChocked() const bool PeerInfo::isRemoteChocked() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::remote_choked); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::remote_choked);
} }
bool PeerInfo::isSupportsExtensions() const bool PeerInfo::isSupportsExtensions() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::supports_extensions); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::supports_extensions);
} }
bool PeerInfo::isLocalConnection() const bool PeerInfo::isLocalConnection() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::local_connection); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::local_connection);
} }
bool PeerInfo::isHandshake() const bool PeerInfo::isHandshake() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::handshake); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::handshake);
} }
bool PeerInfo::isConnecting() const bool PeerInfo::isConnecting() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::connecting); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::connecting);
} }
bool PeerInfo::isOnParole() const bool PeerInfo::isOnParole() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::on_parole); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::on_parole);
} }
bool PeerInfo::isSeed() const bool PeerInfo::isSeed() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::seed); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::seed);
} }
bool PeerInfo::optimisticUnchoke() const bool PeerInfo::optimisticUnchoke() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::optimistic_unchoke); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::optimistic_unchoke);
} }
bool PeerInfo::isSnubbed() const bool PeerInfo::isSnubbed() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::snubbed); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::snubbed);
} }
bool PeerInfo::isUploadOnly() const bool PeerInfo::isUploadOnly() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::upload_only); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::upload_only);
} }
bool PeerInfo::isEndgameMode() const bool PeerInfo::isEndgameMode() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::endgame_mode); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::endgame_mode);
} }
bool PeerInfo::isHolepunched() const bool PeerInfo::isHolepunched() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::holepunched); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::holepunched);
} }
bool PeerInfo::useI2PSocket() const bool PeerInfo::useI2PSocket() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::i2p_socket); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::i2p_socket);
} }
bool PeerInfo::useUTPSocket() const bool PeerInfo::useUTPSocket() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::utp_socket); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::utp_socket);
} }
bool PeerInfo::useSSLSocket() const bool PeerInfo::useSSLSocket() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::ssl_socket); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::ssl_socket);
} }
bool PeerInfo::isRC4Encrypted() const bool PeerInfo::isRC4Encrypted() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::rc4_encrypted); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::rc4_encrypted);
} }
bool PeerInfo::isPlaintextEncrypted() const bool PeerInfo::isPlaintextEncrypted() const
{ {
return static_cast<bool>(m_nativeInfo.flags & libt::peer_info::plaintext_encrypted); return static_cast<bool>(m_nativeInfo.flags & lt::peer_info::plaintext_encrypted);
} }
PeerAddress PeerInfo::address() const PeerAddress PeerInfo::address() const
@ -229,13 +228,13 @@ QBitArray PeerInfo::pieces() const
QString PeerInfo::connectionType() const QString PeerInfo::connectionType() const
{ {
if (m_nativeInfo.flags & libt::peer_info::utp_socket) if (m_nativeInfo.flags & lt::peer_info::utp_socket)
return QString::fromUtf8(C_UTP); return QString::fromUtf8(C_UTP);
QString connection; QString connection;
switch (m_nativeInfo.connection_type) { switch (m_nativeInfo.connection_type) {
case libt::peer_info::http_seed: case lt::peer_info::http_seed:
case libt::peer_info::web_seed: case lt::peer_info::web_seed:
connection = "Web"; connection = "Web";
break; break;
default: default:

40
src/base/bittorrent/private/filterparserthread.cpp

@ -35,8 +35,6 @@
#include "base/logger.h" #include "base/logger.h"
namespace libt = libtorrent;
namespace namespace
{ {
class IPv4Parser class IPv4Parser
@ -79,24 +77,24 @@ namespace
return false; return false;
} }
libt::address_v4::bytes_type parsed() const lt::address_v4::bytes_type parsed() const
{ {
return m_buf; return m_buf;
} }
private: private:
libt::address_v4::bytes_type m_buf; lt::address_v4::bytes_type m_buf;
}; };
bool parseIPAddress(const char *data, libt::address &address) bool parseIPAddress(const char *data, lt::address &address)
{ {
IPv4Parser parser; IPv4Parser parser;
boost::system::error_code ec; boost::system::error_code ec;
if (parser.tryParse(data)) if (parser.tryParse(data))
address = libt::address_v4(parser.parsed()); address = lt::address_v4(parser.parsed());
else else
address = libt::address_v6::from_string(data, ec); address = lt::address_v6::from_string(data, ec);
return !ec; return !ec;
} }
@ -214,7 +212,7 @@ int FilterParserThread::parseDATFilterFile()
continue; continue;
} }
libt::address startAddr; lt::address startAddr;
int newStart = trim(buffer.data(), start, delimIP - 1); int newStart = trim(buffer.data(), start, delimIP - 1);
if (!parseIPAddress(buffer.data() + newStart, startAddr)) { if (!parseIPAddress(buffer.data() + newStart, startAddr)) {
++parseErrorCount; ++parseErrorCount;
@ -223,7 +221,7 @@ int FilterParserThread::parseDATFilterFile()
continue; continue;
} }
libt::address endAddr; lt::address endAddr;
newStart = trim(buffer.data(), delimIP + 1, endOfIPRange); newStart = trim(buffer.data(), delimIP + 1, endOfIPRange);
if (!parseIPAddress(buffer.data() + newStart, endAddr)) { if (!parseIPAddress(buffer.data() + newStart, endAddr)) {
++parseErrorCount; ++parseErrorCount;
@ -244,7 +242,7 @@ int FilterParserThread::parseDATFilterFile()
// Now Add to the filter // Now Add to the filter
try { try {
m_filter.add_rule(startAddr, endAddr, libt::ip_filter::blocked); m_filter.add_rule(startAddr, endAddr, lt::ip_filter::blocked);
++ruleCount; ++ruleCount;
} }
catch (std::exception &e) { catch (std::exception &e) {
@ -353,7 +351,7 @@ int FilterParserThread::parseP2PFilterFile()
continue; continue;
} }
libt::address startAddr; lt::address startAddr;
int newStart = trim(buffer.data(), partsDelimiter + 1, delimIP - 1); int newStart = trim(buffer.data(), partsDelimiter + 1, delimIP - 1);
if (!parseIPAddress(buffer.data() + newStart, startAddr)) { if (!parseIPAddress(buffer.data() + newStart, startAddr)) {
++parseErrorCount; ++parseErrorCount;
@ -362,7 +360,7 @@ int FilterParserThread::parseP2PFilterFile()
continue; continue;
} }
libt::address endAddr; lt::address endAddr;
newStart = trim(buffer.data(), delimIP + 1, endOfLine); newStart = trim(buffer.data(), delimIP + 1, endOfLine);
if (!parseIPAddress(buffer.data() + newStart, endAddr)) { if (!parseIPAddress(buffer.data() + newStart, endAddr)) {
++parseErrorCount; ++parseErrorCount;
@ -382,7 +380,7 @@ int FilterParserThread::parseP2PFilterFile()
start = endOfLine; start = endOfLine;
try { try {
m_filter.add_rule(startAddr, endAddr, libt::ip_filter::blocked); m_filter.add_rule(startAddr, endAddr, lt::ip_filter::blocked);
++ruleCount; ++ruleCount;
} }
catch (std::exception &e) { catch (std::exception &e) {
@ -463,11 +461,11 @@ int FilterParserThread::parseP2BFilterFile()
// Network byte order to Host byte order // Network byte order to Host byte order
// asio address_v4 constructor expects it // asio address_v4 constructor expects it
// that way // that way
const libt::address_v4 first(ntohl(start)); const lt::address_v4 first(ntohl(start));
const libt::address_v4 last(ntohl(end)); const lt::address_v4 last(ntohl(end));
// Apply to bittorrent session // Apply to bittorrent session
try { try {
m_filter.add_rule(first, last, libt::ip_filter::blocked); m_filter.add_rule(first, last, lt::ip_filter::blocked);
++ruleCount; ++ruleCount;
} }
catch (std::exception &) {} catch (std::exception &) {}
@ -513,11 +511,11 @@ int FilterParserThread::parseP2BFilterFile()
// Network byte order to Host byte order // Network byte order to Host byte order
// asio address_v4 constructor expects it // asio address_v4 constructor expects it
// that way // that way
const libt::address_v4 first(ntohl(start)); const lt::address_v4 first(ntohl(start));
const libt::address_v4 last(ntohl(end)); const lt::address_v4 last(ntohl(end));
// Apply to bittorrent session // Apply to bittorrent session
try { try {
m_filter.add_rule(first, last, libt::ip_filter::blocked); m_filter.add_rule(first, last, lt::ip_filter::blocked);
++ruleCount; ++ruleCount;
} }
catch (std::exception &) {} catch (std::exception &) {}
@ -547,12 +545,12 @@ void FilterParserThread::processFilterFile(const QString &filePath)
m_abort = false; m_abort = false;
m_filePath = filePath; m_filePath = filePath;
m_filter = libt::ip_filter(); m_filter = lt::ip_filter();
// Run it // Run it
start(); start();
} }
libt::ip_filter FilterParserThread::IPfilter() lt::ip_filter FilterParserThread::IPfilter()
{ {
return m_filter; return m_filter;
} }

673
src/base/bittorrent/session.cpp

File diff suppressed because it is too large Load Diff

23
src/base/bittorrent/torrentcreatorthread.cpp

@ -62,7 +62,6 @@ namespace
} }
} }
namespace libt = libtorrent;
using namespace BitTorrent; using namespace BitTorrent;
TorrentCreatorThread::TorrentCreatorThread(QObject *parent) TorrentCreatorThread::TorrentCreatorThread(QObject *parent)
@ -97,9 +96,9 @@ void TorrentCreatorThread::run()
const QString parentPath = Utils::Fs::branchPath(m_params.inputPath) + '/'; const QString parentPath = Utils::Fs::branchPath(m_params.inputPath) + '/';
// Adding files to the torrent // Adding files to the torrent
libt::file_storage fs; lt::file_storage fs;
if (QFileInfo(m_params.inputPath).isFile()) { if (QFileInfo(m_params.inputPath).isFile()) {
libt::add_files(fs, Utils::Fs::toNativePath(m_params.inputPath).toStdString(), fileFilter); lt::add_files(fs, Utils::Fs::toNativePath(m_params.inputPath).toStdString(), fileFilter);
} }
else { else {
// need to sort the file names by natural sort order // need to sort the file names by natural sort order
@ -137,8 +136,8 @@ void TorrentCreatorThread::run()
if (isInterruptionRequested()) return; if (isInterruptionRequested()) return;
libt::create_torrent newTorrent(fs, m_params.pieceSize, -1 lt::create_torrent newTorrent(fs, m_params.pieceSize, -1
, (m_params.isAlignmentOptimized ? libt::create_torrent::optimize_alignment : CreateFlags {})); , (m_params.isAlignmentOptimized ? lt::create_torrent::optimize_alignment : CreateFlags {}));
// Add url seeds // Add url seeds
for (QString seed : asConst(m_params.urlSeeds)) { for (QString seed : asConst(m_params.urlSeeds)) {
@ -158,7 +157,7 @@ void TorrentCreatorThread::run()
if (isInterruptionRequested()) return; if (isInterruptionRequested()) return;
// calculate the hash for all pieces // calculate the hash for all pieces
libt::set_piece_hashes(newTorrent, Utils::Fs::toNativePath(parentPath).toStdString() lt::set_piece_hashes(newTorrent, Utils::Fs::toNativePath(parentPath).toStdString()
, [this, &newTorrent](const int n) { sendProgressSignal(n, newTorrent.num_pieces()); }); , [this, &newTorrent](const int n) { sendProgressSignal(n, newTorrent.num_pieces()); });
// Set qBittorrent as creator and add user comment to // Set qBittorrent as creator and add user comment to
// torrent_info structure // torrent_info structure
@ -169,7 +168,7 @@ void TorrentCreatorThread::run()
if (isInterruptionRequested()) return; if (isInterruptionRequested()) return;
libt::entry entry = newTorrent.generate(); lt::entry entry = newTorrent.generate();
// add source field // add source field
if (!m_params.source.isEmpty()) if (!m_params.source.isEmpty())
@ -190,7 +189,7 @@ void TorrentCreatorThread::run()
if (isInterruptionRequested()) return; if (isInterruptionRequested()) return;
libt::bencode(std::ostream_iterator<char>(outfile), entry); lt::bencode(std::ostream_iterator<char>(outfile), entry);
outfile.close(); outfile.close();
emit updateProgress(100); emit updateProgress(100);
@ -206,9 +205,9 @@ int TorrentCreatorThread::calculateTotalPieces(const QString &inputPath, const i
if (inputPath.isEmpty()) if (inputPath.isEmpty())
return 0; return 0;
libt::file_storage fs; lt::file_storage fs;
libt::add_files(fs, Utils::Fs::toNativePath(inputPath).toStdString(), fileFilter); lt::add_files(fs, Utils::Fs::toNativePath(inputPath).toStdString(), fileFilter);
return libt::create_torrent(fs, pieceSize, -1 return lt::create_torrent(fs, pieceSize, -1
, (isAlignmentOptimized ? libt::create_torrent::optimize_alignment : CreateFlags {})).num_pieces(); , (isAlignmentOptimized ? lt::create_torrent::optimize_alignment : CreateFlags {})).num_pieces();
} }

23
src/base/bittorrent/torrentinfo.cpp

@ -59,15 +59,14 @@ namespace
#endif #endif
} }
namespace libt = libtorrent;
using namespace BitTorrent; using namespace BitTorrent;
TorrentInfo::TorrentInfo(NativeConstPtr nativeInfo) TorrentInfo::TorrentInfo(NativeConstPtr nativeInfo)
{ {
#if (LIBTORRENT_VERSION_NUM < 10200) #if (LIBTORRENT_VERSION_NUM < 10200)
m_nativeInfo = boost::const_pointer_cast<libt::torrent_info>(nativeInfo); m_nativeInfo = boost::const_pointer_cast<lt::torrent_info>(nativeInfo);
#else #else
m_nativeInfo = std::const_pointer_cast<libt::torrent_info>(nativeInfo); m_nativeInfo = std::const_pointer_cast<lt::torrent_info>(nativeInfo);
#endif #endif
} }
@ -88,9 +87,9 @@ TorrentInfo TorrentInfo::load(const QByteArray &data, QString *error) noexcept
// used in `torrent_info()` constructor // used in `torrent_info()` constructor
const int depthLimit = 100; const int depthLimit = 100;
const int tokenLimit = 10000000; const int tokenLimit = 10000000;
libt::error_code ec; lt::error_code ec;
libt::bdecode_node node; lt::bdecode_node node;
bdecode(data.constData(), (data.constData() + data.size()), node, ec bdecode(data.constData(), (data.constData() + data.size()), node, ec
, nullptr, depthLimit, tokenLimit); , nullptr, depthLimit, tokenLimit);
if (ec) { if (ec) {
@ -99,7 +98,7 @@ TorrentInfo TorrentInfo::load(const QByteArray &data, QString *error) noexcept
return TorrentInfo(); return TorrentInfo();
} }
TorrentInfo info {NativePtr(new libt::torrent_info(node, ec))}; TorrentInfo info {NativePtr(new lt::torrent_info(node, ec))};
if (ec) { if (ec) {
if (error) if (error)
*error = QString::fromStdString(ec.message()); *error = QString::fromStdString(ec.message());
@ -270,7 +269,7 @@ QList<TrackerEntry> TorrentInfo::trackers() const
if (!isValid()) return {}; if (!isValid()) return {};
QList<TrackerEntry> trackers; QList<TrackerEntry> trackers;
for (const libt::announce_entry &tracker : m_nativeInfo->trackers()) for (const lt::announce_entry &tracker : m_nativeInfo->trackers())
trackers.append(tracker); trackers.append(tracker);
return trackers; return trackers;
@ -281,8 +280,8 @@ QList<QUrl> TorrentInfo::urlSeeds() const
if (!isValid()) return {}; if (!isValid()) return {};
QList<QUrl> urlSeeds; QList<QUrl> urlSeeds;
for (const libt::web_seed_entry &webSeed : m_nativeInfo->web_seeds()) for (const lt::web_seed_entry &webSeed : m_nativeInfo->web_seeds())
if (webSeed.type == libt::web_seed_entry::url_seed) if (webSeed.type == lt::web_seed_entry::url_seed)
urlSeeds.append(QUrl(webSeed.url.c_str())); urlSeeds.append(QUrl(webSeed.url.c_str()));
return urlSeeds; return urlSeeds;
@ -312,13 +311,13 @@ QVector<int> TorrentInfo::fileIndicesForPiece(const int pieceIndex) const
if (!isValid() || (pieceIndex < 0) || (pieceIndex >= piecesCount())) if (!isValid() || (pieceIndex < 0) || (pieceIndex >= piecesCount()))
return {}; return {};
const std::vector<libt::file_slice> files( const std::vector<lt::file_slice> files(
nativeInfo()->map_block(LTPieceIndex {pieceIndex}, 0 nativeInfo()->map_block(LTPieceIndex {pieceIndex}, 0
, nativeInfo()->piece_size(LTPieceIndex {pieceIndex}))); , nativeInfo()->piece_size(LTPieceIndex {pieceIndex})));
QVector<int> res; QVector<int> res;
res.reserve(int(files.size())); res.reserve(int(files.size()));
std::transform(files.begin(), files.end(), std::back_inserter(res), std::transform(files.begin(), files.end(), std::back_inserter(res),
[](const libt::file_slice &s) { return static_cast<int>(s.file_index); }); [](const lt::file_slice &s) { return static_cast<int>(s.file_index); });
return res; return res;
} }
@ -361,7 +360,7 @@ TorrentInfo::PieceRange TorrentInfo::filePieces(const int fileIndex) const
return {}; return {};
} }
const libt::file_storage &files = nativeInfo()->files(); const lt::file_storage &files = nativeInfo()->files();
const auto fileSize = files.file_size(LTFileIndex {fileIndex}); const auto fileSize = files.file_size(LTFileIndex {fileIndex});
const auto fileOffset = files.file_offset(LTFileIndex {fileIndex}); const auto fileOffset = files.file_offset(LTFileIndex {fileIndex});
return makeInterval(static_cast<int>(fileOffset / pieceLength()), return makeInterval(static_cast<int>(fileOffset / pieceLength()),

Loading…
Cancel
Save