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.
This commit is contained in:
Chocobo1
2019-05-07 11:22:39 +08:00
parent 6d73a7ef0a
commit 677a419f0b
6 changed files with 405 additions and 412 deletions

View File

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