Wrap function into anonymous namespace

This commit is contained in:
Chocobo1 2017-11-21 18:23:39 +08:00
commit 034d71dce3
No known key found for this signature in database
GPG key ID: 210D9C873253A68C

View file

@ -35,8 +35,8 @@
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <libtorrent/bencode.hpp> #include <libtorrent/bencode.hpp>
#include <libtorrent/create_torrent.hpp> #include <libtorrent/create_torrent.hpp>
#include <libtorrent/torrent_info.hpp>
#include <libtorrent/storage.hpp> #include <libtorrent/storage.hpp>
#include <libtorrent/torrent_info.hpp>
#include <QFile> #include <QFile>
@ -44,15 +44,18 @@
#include "base/utils/misc.h" #include "base/utils/misc.h"
#include "base/utils/string.h" #include "base/utils/string.h"
namespace libt = libtorrent; namespace
using namespace BitTorrent; {
// do not include files and folders whose // do not include files and folders whose
// name starts with a . // name starts with a .
bool fileFilter(const std::string &f) bool fileFilter(const std::string &f)
{ {
return !Utils::Fs::fileName(QString::fromStdString(f)).startsWith('.'); return !Utils::Fs::fileName(QString::fromStdString(f)).startsWith('.');
} }
}
namespace libt = libtorrent;
using namespace BitTorrent;
TorrentCreatorThread::TorrentCreatorThread(QObject *parent) TorrentCreatorThread::TorrentCreatorThread(QObject *parent)
: QThread(parent) : QThread(parent)