mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 23:42:33 +02:00
refactor: Fix "modernize-use-starts-ends-with" clang-tidy warning
This commit is contained in:
parent
ea9e64ff3c
commit
df27ee9f02
@ -72,7 +72,7 @@ static bool ParseAddress(std::string& address,
|
|||||||
struct sockaddr_un& addr,
|
struct sockaddr_un& addr,
|
||||||
std::string& error)
|
std::string& error)
|
||||||
{
|
{
|
||||||
if (address.compare(0, 4, "unix") == 0 && (address.size() == 4 || address[4] == ':')) {
|
if (address == "unix" || address.starts_with("unix:")) {
|
||||||
fs::path path;
|
fs::path path;
|
||||||
if (address.size() <= 5) {
|
if (address.size() <= 5) {
|
||||||
path = data_dir / fs::PathFromString(strprintf("%s.sock", RemovePrefixView(dest_exe_name, "bitcoin-")));
|
path = data_dir / fs::PathFromString(strprintf("%s.sock", RemovePrefixView(dest_exe_name, "bitcoin-")));
|
||||||
|
Loading…
Reference in New Issue
Block a user