Skip to content

Commit 13e81b0

Browse files
nehebrakshasa
authored andcommitted
clang-tidy: remove unused includes
Found with misc-include-cleaner. Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 parent 3cb628c commit 13e81b0

73 files changed

Lines changed: 64 additions & 229 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/data/chunk.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636

3737
#include "config.h"
3838

39-
#include <cstring>
4039
#include <algorithm>
41-
#include <functional>
42-
#include <csignal>
4340
#include <csetjmp>
41+
#include <csignal>
42+
#include <cstring>
43+
#include <functional>
4444

4545
#include "torrent/exceptions.h"
4646

src/data/chunk_part.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "config.h"
22

33
#include <algorithm>
4-
#include <unistd.h>
54

65
#include "torrent/exceptions.h"
76
#include "chunk_part.h"

src/data/hash_queue.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
#include "data/hash_queue.h"
44

55
#include <functional>
6-
#include <unistd.h>
76
#include <utility>
87

9-
#include "data/chunk.h"
10-
#include "data/chunk_list_node.h"
118
#include "data/hash_chunk.h"
129
#include "data/thread_disk.h"
13-
#include "torrent/exceptions.h"
1410
#include "torrent/data/download_data.h"
11+
#include "torrent/exceptions.h"
1512
#include "torrent/utils/log.h"
16-
#include "torrent/utils/thread.h"
1713

1814
#define LT_LOG_DATA(data, log_level, log_fmt, ...) \
1915
lt_log_print_data(LOG_STORAGE_##log_level, data, "hash_queue", log_fmt, __VA_ARGS__);

src/data/hash_queue_node.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
#include "hash_chunk.h"
4040
#include "hash_queue_node.h"
41-
#include "chunk_list_node.h"
4241

4342
namespace torrent {
4443

src/data/hash_torrent.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "torrent/utils/log.h"
77

88
#include "hash_torrent.h"
9-
#include "hash_queue.h"
109

1110
#define LT_LOG_THIS(log_level, log_fmt, ...) \
1211
lt_log_print_data(LOG_STORAGE_##log_level, m_chunk_list->data(), "hash_torrent", log_fmt, __VA_ARGS__);

src/data/memory_chunk.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#include "config.h"
22

3-
#include <unistd.h>
4-
#include <sys/types.h>
5-
#include <sys/mman.h>
63
#include <rak/error_number.h>
4+
#include <sys/mman.h>
5+
#include <unistd.h>
76

87
#include "torrent/exceptions.h"
98
#include "memory_chunk.h"

src/data/socket_file.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,10 @@
55
#include "torrent/utils/log.h"
66

77
#include <fcntl.h>
8-
#include <unistd.h>
9-
#include <rak/error_number.h>
108
#include <rak/file_stat.h>
11-
#include <sys/ioctl.h>
129
#include <sys/mman.h>
1310
#include <sys/types.h>
14-
15-
#ifdef USE_FALLOCATE
16-
#ifndef _GNU_SOURCE
17-
#define _GNU_SOURCE
18-
#endif
19-
#include <linux/falloc.h>
20-
#endif
11+
#include <unistd.h>
2112

2213
#define LT_LOG_ERROR(log_fmt, ...) \
2314
lt_log_print(LOG_STORAGE, "socket_file->%i: " log_fmt, m_fd, __VA_ARGS__);

src/dht/dht_node.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "config.h"
22

3-
#include "torrent/exceptions.h"
43
#include "torrent/object.h"
54
#include "torrent/utils/log.h"
65

src/dht/dht_router.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,15 @@
33
#include "dht_router.h"
44

55
#include <cassert>
6-
#include <sstream>
76

87
#include "dht_bucket.h"
98
#include "dht_tracker.h"
109
#include "dht_transaction.h"
11-
#include "manager.h"
12-
#include "torrent/connection_manager.h"
13-
#include "torrent/download_info.h"
1410
#include "torrent/exceptions.h"
1511
#include "torrent/net/resolver.h"
1612
#include "torrent/net/socket_address.h"
1713
#include "torrent/tracker/dht_controller.h"
1814
#include "torrent/utils/log.h"
19-
#include "torrent/utils/thread.h"
2015
#include "utils/sha1.h"
2116

2217
#define LT_LOG_THIS(log_fmt, ...) \

src/dht/dht_server.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,16 @@
55
#include <algorithm>
66
#include <cstdio>
77

8-
#include "manager.h"
9-
#include "thread_main.h"
108
#include "dht/dht_bucket.h"
119
#include "dht/dht_router.h"
1210
#include "dht/dht_transaction.h"
13-
#include "torrent/exceptions.h"
11+
#include "manager.h"
1412
#include "torrent/connection_manager.h"
15-
#include "torrent/download_info.h"
13+
#include "torrent/exceptions.h"
1614
#include "torrent/object.h"
15+
#include "torrent/object_static_map.h"
1716
#include "torrent/object_stream.h"
1817
#include "torrent/poll.h"
19-
#include "torrent/object_static_map.h"
2018
#include "torrent/throttle.h"
2119
#include "torrent/utils/log.h"
2220
#include "tracker/tracker_dht.h"

0 commit comments

Comments
 (0)