Skip to content

Commit 516b75f

Browse files
committed
1 parent 483fb8d commit 516b75f

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ bugprone-use-after-move,
55
misc-unused-using-decls,
66
modernize-use-default-member-init,
77
modernize-use-nullptr,
8+
performance-faster-string-find,
89
performance-for-range-copy,
910
performance-move-const-arg,
1011
performance-no-automatic-move,

src/rpc/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,12 +732,12 @@ UniValue RPCArg::MatchesType(const UniValue& request) const
732732

733733
std::string RPCArg::GetFirstName() const
734734
{
735-
return m_names.substr(0, m_names.find("|"));
735+
return m_names.substr(0, m_names.find('|'));
736736
}
737737

738738
std::string RPCArg::GetName() const
739739
{
740-
CHECK_NONFATAL(std::string::npos == m_names.find("|"));
740+
CHECK_NONFATAL(std::string::npos == m_names.find('|'));
741741
return m_names;
742742
}
743743

src/util/bip32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ bool ParseHDKeypath(const std::string& keypath_str, std::vector<uint32_t>& keypa
2525
}
2626
// Finds whether it is hardened
2727
uint32_t path = 0;
28-
size_t pos = item.find("'");
28+
size_t pos = item.find('\'');
2929
if (pos != std::string::npos) {
3030
// The hardened tick can only be in the last index of the string
3131
if (pos != item.size() - 1) {

src/zmq/zmqpublishnotifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static bool IsZMQAddressIPV6(const std::string &zmq_address)
9696
{
9797
const std::string tcp_prefix = "tcp://";
9898
const size_t tcp_index = zmq_address.rfind(tcp_prefix);
99-
const size_t colon_index = zmq_address.rfind(":");
99+
const size_t colon_index = zmq_address.rfind(':');
100100
if (tcp_index == 0 && colon_index != std::string::npos) {
101101
const std::string ip = zmq_address.substr(tcp_prefix.length(), colon_index - tcp_prefix.length());
102102
CNetAddr addr;

0 commit comments

Comments
 (0)