chore: remove unused function tr_strcasestr() (#2552)

This commit is contained in:
Charles Kerr 2022-01-31 15:59:14 -06:00 committed by GitHub
parent 253f4fe009
commit 7bc668680e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 0 additions and 31 deletions

View File

@ -568,9 +568,7 @@ set(NEEDED_FUNCTIONS
pwrite
sendfile64
statvfs
strcasestr
strlcpy
strsep
syslog
uselocale)

View File

@ -3283,11 +3283,8 @@
"-DWITH_UTP",
"-D__TRANSMISSION__",
"-DHAVE_STRLCPY",
"-DHAVE_STRLCAT",
"-DHAVE_ASPRINTF",
"-DHAVE_LIBGEN",
"-DHAVE_STRCASECMP",
"-DHAVE_STRCASESTR",
"-DHAVE_ZLIB",
"-DHAVE_ICONV",
);
@ -3478,11 +3475,8 @@
"-DWITH_UTP",
"-D__TRANSMISSION__",
"-DHAVE_STRLCPY",
"-DHAVE_STRLCAT",
"-DHAVE_ASPRINTF",
"-DHAVE_LIBGEN",
"-DHAVE_STRCASECMP",
"-DHAVE_STRCASESTR",
"-DHAVE_ZLIB",
"-DHAVE_ICONV",
);
@ -3730,11 +3724,8 @@
"-DWITH_UTP",
"-D__TRANSMISSION__",
"-DHAVE_STRLCPY",
"-DHAVE_STRLCAT",
"-DHAVE_ASPRINTF",
"-DHAVE_LIBGEN",
"-DHAVE_STRCASECMP",
"-DHAVE_STRCASESTR",
"-DHAVE_ZLIB",
"-DHAVE_ICONV",
);

View File

@ -466,23 +466,6 @@ bool tr_wildmat(char const* text, char const* p)
return (p[0] == '*' && p[1] == '\0') || (DoMatch(text, p) != 0);
}
char const* tr_strcasestr(char const* haystack, char const* needle)
{
#ifdef HAVE_STRCASESTR
return strcasestr(haystack, needle);
#elif defined(_WIN32)
return StrStrIA(haystack, needle);
#else
#error please open a PR to implement tr_strcasestr() for your platform
#endif
}
char* tr_strdup_printf(char const* fmt, ...)
{
evbuffer* const buf = evbuffer_new();

View File

@ -276,9 +276,6 @@ char const* tr_strerror(int errnum);
/** @brief Returns true if the string ends with the specified case-insensitive suffix */
bool tr_str_has_suffix(char const* str, char const* suffix);
/** @brief Portability wrapper for strcasestr() that uses the system implementation if available */
char const* tr_strcasestr(char const* haystack, char const* needle);
template<typename T>
std::string tr_strlower(T in)
{