chore: iwyu cstring, cstdlib, optional, unordered_set (#3532)

This commit is contained in:
Charles Kerr 2022-07-27 16:53:39 -05:00 committed by GitHub
parent 62e40e88cf
commit b889f0c395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 14 additions and 17 deletions

View File

@ -5,11 +5,11 @@
#include <array>
#include <cstdio> /* fprintf () */
#include <cstdlib> /* atoi () */
#include <cstring> /* memcmp () */
#include <signal.h>
#include <string>
#include <string_view>
#include <signal.h>
#include <fmt/format.h>
#include <libtransmission/transmission.h>

View File

@ -6,7 +6,6 @@
#include <algorithm>
#include <climits> /* INT_MAX */
#include <cstddef>
#include <cstring> // strchr
#include <list>
#include <string>
#include <string_view>

View File

@ -11,6 +11,7 @@
#include <array>
#include <cstdint> // uint64_t
#include <optional>
#include <string>
#include <string_view>
#include <vector>

View File

@ -4,9 +4,7 @@
// License text can be found in the licenses/ folder.
#include <algorithm> // std::copy_n()
#include <climits> /* USHRT_MAX */
#include <cstdio> /* fprintf() */
#include <cstring> /* strchr(), memcmp(), memcpy() */
#include <iomanip>
#include <iostream>
#include <iterator>

View File

@ -8,7 +8,6 @@
#include <cinttypes> // PRIu64
#include <climits> // INT_MAX
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <iterator>

View File

@ -5,6 +5,7 @@
#include <algorithm>
#include <array>
#include <climits> // SIZE_MAX
#include <vector>
#include "tr-popcount.h"

View File

@ -6,7 +6,7 @@
#include <algorithm>
#include <cerrno>
#include <cstdio>
#include <cstring>
#include <cstdlib> // bsearch()
#include <string_view>
#include <vector>

View File

@ -8,8 +8,6 @@
#include <algorithm>
#include <array>
#include <cctype> /* isprint() */
#include <cstdlib> /* strtol() */
#include <cstring>
#include <optional>
#include <string_view>
#include <tuple>
@ -179,12 +177,11 @@ constexpr std::string_view charint(char ch)
}
}
int strint(void const* pch, int span, int base = 0)
int strint(char const* pch, int span, int base = 10)
{
char tmp[64];
memcpy(tmp, pch, span);
tmp[span] = '\0';
return strtol(tmp, nullptr, base);
auto sv = std::string_view{ pch, static_cast<size_t>(span) };
auto const num = tr_parseNum<int>(sv, base);
return num ? *num : 0;
}
constexpr std::string_view getMnemonicEnd(uint8_t ch)

View File

@ -4,7 +4,6 @@
// License text can be found in the licenses/ folder.
#include <cerrno>
#include <cstring>
#include <string>
#include <string_view>

View File

@ -9,6 +9,7 @@
#include <condition_variable>
#include <csignal>
#include <cstdint>
#include <cstdlib> // atoi()
#include <ctime>
#include <iterator> // std::back_inserter
#include <list>

View File

@ -16,6 +16,7 @@
#include <cstdint> // uintX_t
#include <memory>
#include <mutex>
#include <optional>
#include <string>
#include <string_view>
#include <tuple>

View File

@ -7,6 +7,7 @@
#include <cctype>
#include <cerrno> /* EILSEQ, EINVAL */
#include <cmath> /* fabs() */
#include <cstdlib>
#include <cstring>
#include <deque>
#include <string_view>

View File

@ -4,7 +4,6 @@
// License text can be found in the licenses/ folder.
#include <cstddef> /* offsetof */
#include <cstdlib> /* realloc() */
#include <errno.h>
#include <process.h> /* _beginthreadex() */

View File

@ -3,6 +3,7 @@
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <cstring> // strcmp()
#include <map>
#include <memory>
#include <string>

View File

@ -7,7 +7,6 @@
#include <array>
#include <cctype>
#include <cstddef>
#include <cstdlib>
#include <limits>
#include <optional>
#include <string>

View File

@ -6,6 +6,7 @@
#pragma once
#include <memory>
#include <unordered_set>
#include <QString>
#include <QMap>