iwyu: remove, add std headers where used (#5694)
* chore: remove unused #include <array> * chore: remove unused #include <chrono> * chore: remove unused #include <set> * chore: remove unused #include <algorithm> * chore: remove unused #include "interned-string.h" * chore: remove unused #include <list> * chore: remove unused #include <optional> * chore: iwyu <cstddef> * chore: iwyu <ctime> * chore: remove unused #include <cerrno> * chore: remove unused #include <deque> * chore: remove unused #include <vector> * chore: remove unused #include <memory> * chore: remove unused #include <unordered_set> * chore: remove unused #include <array> * chore: remove unused #include <mutex> * chore: remove unused #include <functional> * chore: remove unused #include <cmath>
This commit is contained in:
parent
cb101ec6cf
commit
ce66e5c442
|
@ -46,7 +46,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cinttypes> // PRId64
|
||||
#include <cmath> // pow()
|
||||
#include <cstring> // strstr
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
|
||||
#include <fmt/core.h>
|
||||
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
||||
using namespace std::string_view_literals;
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include <bitset>
|
||||
#include <initializer_list>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
class Percents;
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
#include <fmt/core.h>
|
||||
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <stack>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstddef> // size_t
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cstdint> // uint64_t
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include <algorithm> // std::copy_n()
|
||||
#include <cctype>
|
||||
#include <chrono>
|
||||
#include <cstdio> /* fprintf() */
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm> // for std::find_if()
|
||||
#include <cerrno> // for errno, EAFNOSUPPORT
|
||||
#include <climits> // for CHAR_BIT
|
||||
#include <cstring> // for memset()
|
||||
#include <ctime>
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include <cstdint> // uint32_t
|
||||
#include <ctime>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <climits> // SIZE_MAX
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <random>
|
||||
#include <string>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <cstddef> // size_t
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#undef _GNU_SOURCE
|
||||
#define _GNU_SOURCE // NOLINT
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cerrno>
|
||||
#include <climits> /* PATH_MAX */
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cctype> // for isalpha()
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <iterator> // for std::back_inserter
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <cstdint> // uint64_t
|
||||
#include <ctime> // time_t
|
||||
#include <functional>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm> // std::all_of
|
||||
#include <chrono>
|
||||
#include <cstddef>
|
||||
#include <string_view>
|
||||
#include <utility> // std::move
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <chrono> // std::chrono::milliseconds
|
||||
#include <condition_variable>
|
||||
#include <cstddef> // size_t
|
||||
#include <memory> // std::unique_ptr
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cerrno>
|
||||
#include <chrono>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <cstdint> // uint8_t, uint32_t
|
||||
|
||||
#include "transmission.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstddef> // size_t
|
||||
#include <ctime>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstddef> // size_t
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstddef> // size_t
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <climits>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <iterator> // std::back_inserter
|
||||
#include <string_view>
|
||||
#include <utility> // std::pair
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cstdint> // uint8_t, uint64_t
|
||||
#include <string_view>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <cstddef> // size_t
|
||||
#include <cstdint> // uint8_t, uint32_t, uint64_t
|
||||
#include <string>
|
||||
|
||||
|
@ -18,7 +19,6 @@
|
|||
#include "bitfield.h"
|
||||
#include "block-info.h"
|
||||
#include "history.h"
|
||||
#include "interned-string.h"
|
||||
#include "net.h" // tr_port
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cerrno>
|
||||
#include <cstdint>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <memory>
|
||||
#include <utility>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include <small/map.hpp>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <ctime> // time_t
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <iterator> // std::back_inserter
|
||||
#include <memory>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <algorithm> // for std::copy_n()
|
||||
#include <array>
|
||||
#include <cstddef> // size_t, std::byte
|
||||
#include <memory>
|
||||
|
||||
#include "tr-macros.h" // tr_sha1_digest_t
|
||||
#include "tr-arc4.h"
|
||||
|
|
|
@ -9,11 +9,13 @@
|
|||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory>
|
||||
#include <utility> // for std::pair<>
|
||||
|
||||
#include "interned-string.h"
|
||||
#include "peer-common.h" // for tr_peer
|
||||
|
||||
class tr_peer;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#endif
|
||||
|
||||
#include <atomic>
|
||||
#include <cstddef> // size_t
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility> // for std::make_pair()
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <array>
|
||||
#include <cerrno>
|
||||
#include <cstdint> // uint32_t
|
||||
#include <ctime>
|
||||
|
||||
#include <event2/util.h> /* evutil_inet_ntop() */
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <cerrno>
|
||||
#include <chrono>
|
||||
#include <future>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <string_view>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <bitset>
|
||||
#include <cstddef> // size_t
|
||||
#include <ctime> // for time_t
|
||||
#include <optional>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <ctime>
|
||||
#include <string_view>
|
||||
#include <iterator> // for std::back_inserter
|
||||
|
||||
|
|
|
@ -12,12 +12,10 @@
|
|||
#include <ctime>
|
||||
#include <future>
|
||||
#include <iterator> // for std::back_inserter
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <numeric> // for std::accumulate()
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include <array>
|
||||
#include <cstddef> // size_t
|
||||
#include <cstdint> // uintX_t
|
||||
#include <ctime> // time_t
|
||||
#include <functional>
|
||||
#include <future>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cerrno> // for EINVAL
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <ctime>
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
#include <cstddef>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <chrono>
|
||||
#include <cstdio>
|
||||
#include <cstdlib> // for abort()
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include <cstddef> // size_t
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// or any future license endorsed by Mnemosyne LLC.
|
||||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib> /* exit() */
|
||||
#include <cstring>
|
||||
#include <string_view>
|
||||
|
|
|
@ -10,14 +10,15 @@
|
|||
|
||||
// --- Basic Types
|
||||
|
||||
#include <stdbool.h> /* bool */
|
||||
#include <stddef.h> /* size_t */
|
||||
#include <stdint.h> /* uintN_t */
|
||||
#include <time.h> /* time_t */
|
||||
#include <stddef.h> // size_t
|
||||
#include <stdint.h> // uintN_t
|
||||
#include <time.h> // time_t
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#else
|
||||
#include <stdbool.h> // bool
|
||||
#endif
|
||||
|
||||
#include "tr-macros.h"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <algorithm> // for std::sort, std::transform
|
||||
#include <array> // std::array
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cfloat> // DBL_DIG
|
||||
#include <chrono>
|
||||
#include <cstdint> // SIZE_MAX
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <cstddef> // size_t
|
||||
#include <cstdint> // int64_t
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <ctime>
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <chrono>
|
||||
#include <set>
|
||||
|
||||
#define LIBTRANSMISSION_WATCHDIR_MODULE
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
#include <cstddef>
|
||||
#include <cstddef> // size_t
|
||||
#include <ctime> // time_t
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "Speed.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
Formatter& Formatter::get()
|
||||
{
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <cctype> /* isspace */
|
||||
#include <cinttypes> // PRId64
|
||||
#include <cerrno>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring> /* strcmp */
|
||||
|
|
Loading…
Reference in New Issue