mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-30 02:15:54 +02:00
tidy: add clang-tidy modernize-use-starts-ends-with check
This commit is contained in:
@@ -230,7 +230,7 @@ CService LookupNumeric(const std::string& name, uint16_t portDefault, DNSLookupF
|
||||
bool IsUnixSocketPath(const std::string& name)
|
||||
{
|
||||
#ifdef HAVE_SOCKADDR_UN
|
||||
if (name.find(ADDR_PREFIX_UNIX) != 0) return false;
|
||||
if (!name.starts_with(ADDR_PREFIX_UNIX)) return false;
|
||||
|
||||
// Split off "unix:" prefix
|
||||
std::string str{name.substr(ADDR_PREFIX_UNIX.length())};
|
||||
|
||||
Reference in New Issue
Block a user