Browse Source

Wrap function into anonymous namespace

adaptive-webui-19844
Chocobo1 7 years ago
parent
commit
034d71dce3
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 19
      src/base/bittorrent/torrentcreatorthread.cpp

19
src/base/bittorrent/torrentcreatorthread.cpp

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

Loading…
Cancel
Save