refactor: include cleanups (#2392)
* refactor: include <memory> when using shared_ptr or unique_ptr * refactor: include <cstdio> iff we use it * refactor: include <cstring> iff we use it * refactor: include <cstdlib> iff we use it * refactor: include <string_view> or <string> iff we use it * refactor: include <array> iff we use it * refactor: include <ctime> iff we use it * refactor: include <cctype> iff we use it * refactor: misc #include cleanups in libtransmission
This commit is contained in:
parent
a9284c0a6b
commit
b0ee4007ff
|
@ -21,12 +21,15 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#include <array>
|
||||
#include <stdio.h> /* fprintf () */
|
||||
#include <stdlib.h> /* atoi () */
|
||||
#include <string.h> /* memcmp () */
|
||||
#include <cstdio> /* fprintf () */
|
||||
#include <cstdlib> /* atoi () */
|
||||
#include <cstring> /* memcmp () */
|
||||
#include <signal.h>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
|
||||
#include <libtransmission/error.h>
|
||||
#include <libtransmission/file.h>
|
||||
#include <libtransmission/tr-getopt.h>
|
||||
|
|
|
@ -21,17 +21,17 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <locale.h>
|
||||
#include <cstdlib> // exit()
|
||||
#include <ctime>
|
||||
#include <map>
|
||||
#include <signal.h>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* exit() */
|
||||
#include <string.h>
|
||||
#include <thread>
|
||||
#include <time.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <giomm.h>
|
||||
#include <glib/gmessages.h>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <stddef.h>
|
||||
#include <stdio.h> /* sscanf() */
|
||||
#include <stdlib.h> /* abort() */
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <glib/gstdio.h> /* g_remove() */
|
||||
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <climits> /* INT_MAX */
|
||||
#include <cstddef>
|
||||
#include <cstring> // strchr
|
||||
#include <limits.h> /* INT_MAX */
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <stdlib.h> /* qsort() */
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <glibmm.h>
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
|
||||
#include <libtransmission/utils.h>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <glibmm.h>
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <cctype>
|
||||
#include <string.h>
|
||||
#include <memory>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h> /* strtol() */
|
||||
#include <string.h>
|
||||
#include <string_view>
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h> /* isspace */
|
||||
#include <limits.h> /* USHRT_MAX, INT_MAX */
|
||||
#include <climits> /* USHRT_MAX, INT_MAX */
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <glibmm.h>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
@ -21,10 +21,12 @@
|
|||
*****************************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath> /* pow() */
|
||||
#include <cstring> // strstr
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <math.h> /* pow() */
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <giomm.h>
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <limits.h> /* INT_MAX */
|
||||
#include <climits> /* INT_MAX */
|
||||
#include <cstring> // strchr()
|
||||
#include <memory>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <ctime>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
#include <glibmm.h>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "announce-list.h"
|
||||
#include "metainfo.h"
|
||||
#include "quark.h"
|
||||
#include "utils.h"
|
||||
#include "variant.h"
|
||||
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
#include <cstddef>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "quark.h"
|
||||
#include "interned-string.h"
|
||||
#include "web-utils.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <array>
|
||||
#include <cstddef> // size_t
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <climits> /* USHRT_MAX */
|
||||
#include <cstdio> /* fprintf() */
|
||||
#include <cstring> /* strchr(), memcmp(), memcpy() */
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <event2/buffer.h>
|
||||
|
@ -21,6 +22,7 @@
|
|||
#include "log.h"
|
||||
#include "net.h" /* tr_globalIPv6() */
|
||||
#include "peer-mgr.h" /* pex */
|
||||
#include "quark.h"
|
||||
#include "torrent.h"
|
||||
#include "trevent.h" /* tr_runInEventThread() */
|
||||
#include "utils.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <cerrno> /* errno, EAFNOSUPPORT */
|
||||
#include <cstring> /* memset() */
|
||||
#include <ctime>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <event2/buffer.h>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <ctime>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#endif
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <ctime>
|
||||
#include <string_view>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
implement missing (or duplicate) functionality without exposing internal
|
||||
details in header files. */
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "crypto-utils.h"
|
||||
#include "tr-assert.h"
|
||||
#include "tr-macros.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#include <cstring> // memmove(), memset()
|
||||
#include <iterator>
|
||||
#include <random>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <cinttypes> // uintX_t
|
||||
#include <cstddef>
|
||||
#include <optional>
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <string_view>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "error.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <array>
|
||||
#include <cerrno>
|
||||
#include <cinttypes>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
|
||||
#include "transmission.h"
|
||||
|
|
|
@ -20,12 +20,14 @@
|
|||
#include <dirent.h>
|
||||
#include <fcntl.h> /* O_LARGEFILE, posix_fadvise(), [posix_]fallocate(), fcntl() */
|
||||
#include <libgen.h> /* basename(), dirname() */
|
||||
#include <string_view>
|
||||
#include <unistd.h> /* lseek(), write(), ftruncate(), pread(), pwrite(), pathconf(), etc */
|
||||
#include <vector>
|
||||
|
||||
#include <sys/file.h> /* flock() */
|
||||
#include <sys/mman.h> /* mmap(), munmap() */
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h> /* lseek(), write(), ftruncate(), pread(), pwrite(), pathconf(), etc */
|
||||
#include <vector>
|
||||
|
||||
#ifdef HAVE_XFS_XFS_H
|
||||
#include <xfs/xfs.h>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring> /* strlen() */
|
||||
#include <string_view>
|
||||
|
||||
#include "transmission.h"
|
||||
#include "error.h"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstdlib> /* bsearch() */
|
||||
#include <cstdlib> /* abort() */
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -8,8 +8,10 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <cerrno>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
||||
#include <event2/event.h>
|
||||
#include <event2/buffer.h>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#endif
|
||||
|
||||
#include <cinttypes> // uintX_t
|
||||
#include <cstdlib> // size_t
|
||||
#include <cstddef> // size_t
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -23,7 +23,6 @@
|
|||
#include "net.h" /* tr_address */
|
||||
#include "peer-common.h"
|
||||
#include "peer-socket.h"
|
||||
#include "quark.h"
|
||||
|
||||
/**
|
||||
* @addtogroup peers Peers
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstdarg>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <memory> // std::unique_ptr
|
||||
|
@ -29,6 +28,7 @@
|
|||
#include "peer-mgr.h"
|
||||
#include "peer-msgs.h"
|
||||
#include "ptrarray.h"
|
||||
#include "quark.h"
|
||||
#include "session.h"
|
||||
#include "torrent-magnet.h"
|
||||
#include "torrent.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <event2/util.h> /* evutil_ascii_strcasecmp() */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdint> // int64_t
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cstdarg>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <event2/event.h>
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
#include <vector>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "quark.h"
|
||||
#include "tr-assert.h"
|
||||
#include "utils.h" // tr_strvDup()
|
||||
|
||||
using namespace std::literals;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "log.h"
|
||||
#include "net.h"
|
||||
#include "platform.h" /* tr_getWebClientDir() */
|
||||
#include "quark.h"
|
||||
#include "rpc-server.h"
|
||||
#include "rpcimpl.h"
|
||||
#include "session-id.h"
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include <zlib.h>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "completion.h"
|
||||
#include "crypto-utils.h"
|
||||
#include "error.h"
|
||||
|
@ -28,9 +29,10 @@
|
|||
#include "file.h"
|
||||
#include "log.h"
|
||||
#include "platform-quota.h" /* tr_device_info_get_disk_space() */
|
||||
#include "quark.h"
|
||||
#include "rpcimpl.h"
|
||||
#include "session.h"
|
||||
#include "session-id.h"
|
||||
#include "session.h"
|
||||
#include "stats.h"
|
||||
#include "torrent.h"
|
||||
#include "tr-assert.h"
|
||||
|
@ -38,8 +40,8 @@
|
|||
#include "utils.h"
|
||||
#include "variant.h"
|
||||
#include "version.h"
|
||||
#include "web.h"
|
||||
#include "web-utils.h"
|
||||
#include "web.h"
|
||||
|
||||
static auto constexpr RpcVersion = int64_t{ 17 };
|
||||
static auto constexpr RpcVersionMin = int64_t{ 14 };
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <ctime>
|
||||
#include <iterator> // std::back_inserter
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <numeric> // std::acumulate()
|
||||
#include <string_view>
|
||||
#include <unordered_set>
|
||||
|
@ -2841,3 +2842,9 @@ void tr_sessionRemoveTorrent(tr_session* session, tr_torrent* tor)
|
|||
session->torrentsById.erase(tor->uniqueId);
|
||||
session->torrentsByHash.erase(tor->infoHash());
|
||||
}
|
||||
|
||||
tr_torrent* tr_session::getTorrent(std::string_view info_dict_hash_string)
|
||||
{
|
||||
auto info_dict_hash = tr_sha1_from_string(std::data(info_dict_hash_string));
|
||||
return this->getTorrent(info_dict_hash);
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "crypto-utils.h"
|
||||
#include "net.h"
|
||||
#include "tr-macros.h"
|
||||
#include "net.h" // tr_socket_t
|
||||
|
||||
enum tr_auto_switch_state_t
|
||||
{
|
||||
|
@ -125,11 +123,7 @@ public:
|
|||
return it == std::end(src) ? nullptr : it->second;
|
||||
}
|
||||
|
||||
[[nodiscard]] auto getTorrent(std::string_view info_dict_hash_string)
|
||||
{
|
||||
auto info_dict_hash = tr_sha1_from_string(std::data(info_dict_hash_string));
|
||||
return this->getTorrent(info_dict_hash);
|
||||
}
|
||||
[[nodiscard]] tr_torrent* getTorrent(std::string_view info_dict_hash_string);
|
||||
|
||||
[[nodiscard]] auto contains(tr_sha1_digest_t const& info_dict_hash) const
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <cerrno>
|
||||
#include <csignal>
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
#include <string_view>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <cerrno> // EINVAL
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "transmission.h"
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <climits> /* INT_MAX */
|
||||
#include <cstring> /* memcpy(), memset(), memcmp() */
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <event2/buffer.h>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
#include <numeric>
|
||||
#include <string>
|
||||
|
@ -20,8 +21,8 @@
|
|||
#include "crypto-utils.h"
|
||||
#include "error-types.h"
|
||||
#include "error.h"
|
||||
#include "quark.h"
|
||||
#include "torrent-metainfo.h"
|
||||
#include "tr-assert.h"
|
||||
#include "utils.h"
|
||||
#include "variant.h"
|
||||
#include "web-utils.h"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
#include "block-info.h"
|
||||
#include "magnet-metainfo.h"
|
||||
#include "quark.h"
|
||||
|
||||
struct tr_error;
|
||||
struct tr_info;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <climits> /* INT_MAX */
|
||||
#include <cmath>
|
||||
#include <csignal> /* signal() */
|
||||
#include <cstdlib> /* qsort */
|
||||
#include <cstring> /* memcmp */
|
||||
#include <ctime>
|
||||
#include <map>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "file.h"
|
||||
#include "file-piece-map.h"
|
||||
#include "interned-string.h"
|
||||
#include "quark.h"
|
||||
#include "session.h"
|
||||
#include "tr-assert.h"
|
||||
#include "tr-macros.h"
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype> /* isspace() */
|
||||
#include <cstdio>
|
||||
#include <cstdlib> /* exit() */
|
||||
#include <cstring>
|
||||
#include <string_view>
|
||||
|
|
|
@ -21,10 +21,8 @@ THE SOFTWARE.
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype> /* toupper() */
|
||||
#include <cerrno>
|
||||
#include <csignal> /* sig_atomic_t */
|
||||
#include <cstdio>
|
||||
#include <cstring> /* strlen(), strncpy(), strstr(), memset() */
|
||||
#include <type_traits>
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <clocale> /* localeconv() */
|
||||
#include <cmath> /* fabs(), floor() */
|
||||
#include <cstdint> /* SIZE_MAX */
|
||||
#include <cstdio>
|
||||
#include <cstdlib> /* getenv() */
|
||||
#include <cstring> /* strerror(), memset(), memmem() */
|
||||
#include <ctime> /* nanosleep() */
|
||||
|
@ -29,6 +28,7 @@
|
|||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
#include <array>
|
||||
#include <cstdlib>
|
||||
#include <cctype> /* isdigit() */
|
||||
#include <deque>
|
||||
#include <cerrno>
|
||||
|
@ -21,6 +20,7 @@
|
|||
#include "transmission.h"
|
||||
|
||||
#include "tr-assert.h"
|
||||
#include "quark.h"
|
||||
#include "utils.h" /* tr_snprintf() */
|
||||
#include "variant-common.h"
|
||||
#include "variant.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <cctype>
|
||||
#include <cerrno> /* EILSEQ, EINVAL */
|
||||
#include <cmath> /* fabs() */
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <deque>
|
||||
#include <string_view>
|
||||
|
@ -24,6 +23,7 @@
|
|||
|
||||
#include "jsonsl.h"
|
||||
#include "log.h"
|
||||
#include "quark.h"
|
||||
#include "tr-assert.h"
|
||||
#include "utils.h"
|
||||
#include "variant-common.h"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <cstdlib> /* strtod() */
|
||||
#include <cstring>
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
|
@ -38,13 +39,15 @@
|
|||
#define LIBTRANSMISSION_VARIANT_MODULE
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "error.h"
|
||||
#include "file.h"
|
||||
#include "log.h"
|
||||
#include "quark.h"
|
||||
#include "tr-assert.h"
|
||||
#include "utils.h"
|
||||
#include "variant.h"
|
||||
#include "variant-common.h"
|
||||
#include "variant.h"
|
||||
|
||||
/* don't use newlocale/uselocale on old versions of uClibc because they're buggy.
|
||||
* https://trac.transmissionbt.com/ticket/6006 */
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cinttypes> // int64_t
|
||||
#include <cstddef> // size_t
|
||||
#include <inttypes.h> // int64_t
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "quark.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include <cerrno>
|
||||
#include <climits> /* NAME_MAX */
|
||||
#include <cstdlib> /* realloc() */
|
||||
|
||||
#include <unistd.h> /* close() */
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include <cstring> /* strcmp() */
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_set>
|
||||
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
#include <array>
|
||||
#include <cctype>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <limits>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <event2/buffer.h>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "tr-macros.h" // tr_sha1_digest_t
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QLibraryInfo>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
#include <unordered_set>
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
|
||||
#include <libtransmission/transmission.h> // priorities
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "Torrent.h"
|
||||
|
||||
class FilterMode
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <array>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <QCheckBox>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QMap>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "RpcClient.h"
|
||||
#include <string_view>
|
||||
|
||||
#include <cstring>
|
||||
#include "RpcClient.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QAuthenticator>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <ctime> // time_t
|
||||
#include <vector>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <ctime>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QTimer>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring> // strlen()
|
||||
// #include <unistd.h> // sync()
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "subprocess.h"
|
||||
#include "utils.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "transmission.h"
|
||||
|
||||
#include "file.h"
|
||||
#include "net.h"
|
||||
#include "utils.h"
|
||||
|
@ -16,9 +21,6 @@
|
|||
|
||||
#include <event2/event.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
/***
|
||||
****
|
||||
***/
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include <array>
|
||||
#include <stdio.h> /* fprintf() */
|
||||
#include <stdlib.h> /* EXIT_FAILURE */
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include <event2/buffer.h>
|
||||
|
|
|
@ -7,13 +7,14 @@
|
|||
*/
|
||||
|
||||
#include <array>
|
||||
#include <assert.h>
|
||||
#include <ctype.h> /* isspace */
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <cassert>
|
||||
#include <cctype> /* isspace */
|
||||
#include <cerrno>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring> /* strcmp */
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <event2/buffer.h>
|
||||
|
|
|
@ -6,13 +6,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <algorithm>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue