mirror of
https://github.com/transmission/transmission
synced 2025-02-23 22:50:41 +00:00
chore: iwyu (#2553)
This commit is contained in:
parent
7bc668680e
commit
5db993d348
11 changed files with 20 additions and 29 deletions
|
@ -8,7 +8,6 @@
|
|||
#include <map>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#include <stdlib.h> /* strtol() */
|
||||
#include <string_view>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <climits> /* USHRT_MAX, INT_MAX */
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <glibmm.h>
|
||||
#include <glibmm/i18n.h>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <glibmm/i18n.h>
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <array>
|
||||
#include <cstddef> // size_t
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#include "transmission.h"
|
||||
|
|
|
@ -5,19 +5,16 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstddef> // size_t
|
||||
#include <cstdint> // int64_t
|
||||
#include <cstdlib>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <utility> // make_pair
|
||||
|
||||
#include "error.h"
|
||||
#include "utils.h"
|
||||
|
||||
namespace transmission::benc
|
||||
{
|
||||
|
@ -263,10 +260,7 @@ bool parse(
|
|||
case 'i': // int
|
||||
if (auto const value = impl::ParseInt(&benc); !value)
|
||||
{
|
||||
auto const errmsg = tr_strvJoin(
|
||||
std::string_view{ "Malformed benc? Unable to parse integer at pos " },
|
||||
std::to_string(std::data(benc) - stream_begin));
|
||||
tr_error_set(error, err, errmsg);
|
||||
tr_error_set(error, err, "Malformed benc? Unable to parse integer");
|
||||
err = EILSEQ;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <string_view>
|
||||
|
||||
#include <event2/buffer.h>
|
||||
#include <event2/event.h>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <cinttypes> // uintX_t
|
||||
#include <cstddef> // size_t
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <string>
|
||||
#include <string_view>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <limits.h> /* PATH_MAX */
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
// License text can be found in the licenses/ folder.
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
#include <numeric>
|
||||
|
|
|
@ -7,17 +7,14 @@
|
|||
#include <array> // std::array
|
||||
#include <cctype> /* isdigit() */
|
||||
#include <cerrno>
|
||||
#include <cfloat> /* DBL_DIG */
|
||||
#include <clocale> /* localeconv() */
|
||||
#include <cmath> /* fabs(), floor() */
|
||||
#include <cstdint> /* SIZE_MAX */
|
||||
#include <cstdlib> /* getenv() */
|
||||
#include <cstring> /* strerror(), memset(), memmem() */
|
||||
#include <ctime> /* nanosleep() */
|
||||
#include <exception>
|
||||
#include <cfloat> // DBL_DIG
|
||||
#include <clocale> // localeconv()
|
||||
#include <cstdint> // SIZE_MAX
|
||||
#include <cstdlib> // getenv()
|
||||
#include <cstring> /* strerror() */
|
||||
#include <ctime> // nanosleep()
|
||||
#include <iterator> // std::back_inserter
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
@ -26,9 +23,6 @@
|
|||
#include <ws2tcpip.h> /* WSAStartup() */
|
||||
#include <windows.h> /* Sleep(), GetSystemTimeAsFileTime(), GetEnvironmentVariable() */
|
||||
#include <shellapi.h> /* CommandLineToArgv() */
|
||||
#include <shlwapi.h> /* StrStrIA() */
|
||||
#else
|
||||
#include <unistd.h> /* getpagesize() */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ICONV
|
||||
|
@ -40,8 +34,9 @@
|
|||
#include <event2/event.h>
|
||||
|
||||
#include "transmission.h"
|
||||
#include "error.h"
|
||||
|
||||
#include "error-types.h"
|
||||
#include "error.h"
|
||||
#include "file.h"
|
||||
#include "log.h"
|
||||
#include "mime-types.h"
|
||||
|
@ -279,7 +274,7 @@ uint8_t* tr_loadFile(char const* path, size_t* size, tr_error** error)
|
|||
}
|
||||
|
||||
/* Load the torrent file into our buffer */
|
||||
tr_sys_file_t const fd = tr_sys_file_open(path, TR_SYS_FILE_READ | TR_SYS_FILE_SEQUENTIAL, 0, &my_error);
|
||||
auto const fd = tr_sys_file_open(path, TR_SYS_FILE_READ | TR_SYS_FILE_SEQUENTIAL, 0, &my_error);
|
||||
if (fd == TR_BAD_SYS_FILE)
|
||||
{
|
||||
tr_logAddError(err_fmt, path, my_error->message);
|
||||
|
@ -326,7 +321,7 @@ bool tr_loadFile(std::vector<char>& setme, std::string const& path, tr_error** e
|
|||
}
|
||||
|
||||
/* Load the torrent file into our buffer */
|
||||
tr_sys_file_t const fd = tr_sys_file_open(path_sz, TR_SYS_FILE_READ | TR_SYS_FILE_SEQUENTIAL, 0, &my_error);
|
||||
auto const fd = tr_sys_file_open(path_sz, TR_SYS_FILE_READ | TR_SYS_FILE_SEQUENTIAL, 0, &my_error);
|
||||
if (fd == TR_BAD_SYS_FILE)
|
||||
{
|
||||
tr_logAddError(err_fmt, path_sz, my_error->message);
|
||||
|
|
Loading…
Reference in a new issue