Apply coding styles

This commit is contained in:
Alexander Bock
2018-03-08 05:32:46 -05:00
parent c5c95a5640
commit 5a3ef0fda2
38 changed files with 141 additions and 121 deletions

View File

@@ -167,9 +167,9 @@ bool TorrentSynchronization::hasSyncFile() {
void TorrentSynchronization::createSyncFile() {
std::string directoryName = directory();
std::string filepath = directoryName + ".ossync";
FileSys.createDirectory(directoryName, ghoul::filesystem::Directory::Recursive::Yes);
std::ofstream syncFile(filepath, std::ofstream::out);
syncFile << "Synchronized";
syncFile.close();

View File

@@ -85,7 +85,7 @@ void TorrentClient::initialize() {
settings.set_int(libtorrent::settings_pack::active_downloads, -1);
settings.set_int(libtorrent::settings_pack::active_seeds, -1);
settings.set_int(libtorrent::settings_pack::active_limit, 30);
settings.set_str(
libtorrent::settings_pack::dht_bootstrap_nodes,
"router.utorrent.com,dht.transmissionbt.com,router.bittorrent.com,\
@@ -146,7 +146,7 @@ void TorrentClient::deinitialize() {
void TorrentClient::pollAlerts() {
#ifdef SYNC_USE_LIBTORRENT
// Libtorrent does not seem to reliably generate alerts for all added torrents.
// To make sure that the program does not keep waiting for already finished
// To make sure that the program does not keep waiting for already finished
// downsloads, we go through the whole list of torrents when polling.
// However, in theory, the commented code below should be more efficient:
/*

View File

@@ -97,7 +97,7 @@ public:
TorrentProgressCallback cb);
void removeTorrent(TorrentId id);
private:
struct Torrent {
TorrentId id;