diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-03-26 20:17:46 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2023-03-26 20:17:46 +0100 |
commit | 516b75f66ec3ba7495fc028c750937bd66cc9bba (patch) | |
tree | 241cb9a4167cadecf39ecb7b939d8286c942a304 /src/zmq | |
parent | 483fb8d2165bacafe9c12a829afca248feeeb42f (diff) | |
download | bitcoin-516b75f66ec3ba7495fc028c750937bd66cc9bba.tar.xz |
clang-tidy: Add `performance-faster-string-find` check
https://clang.llvm.org/extra/clang-tidy/checks/performance/faster-string-find.html
Diffstat (limited to 'src/zmq')
-rw-r--r-- | src/zmq/zmqpublishnotifier.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp index 6418455d19..55f3d4e934 100644 --- a/src/zmq/zmqpublishnotifier.cpp +++ b/src/zmq/zmqpublishnotifier.cpp @@ -96,7 +96,7 @@ static bool IsZMQAddressIPV6(const std::string &zmq_address) { const std::string tcp_prefix = "tcp://"; const size_t tcp_index = zmq_address.rfind(tcp_prefix); - const size_t colon_index = zmq_address.rfind(":"); + const size_t colon_index = zmq_address.rfind(':'); if (tcp_index == 0 && colon_index != std::string::npos) { const std::string ip = zmq_address.substr(tcp_prefix.length(), colon_index - tcp_prefix.length()); CNetAddr addr; |