Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14864389
D18076.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D18076.diff
View Options
diff --git a/src/.clang-tidy b/src/.clang-tidy
--- a/src/.clang-tidy
+++ b/src/.clang-tidy
@@ -5,11 +5,11 @@
readability-braces-around-statements,
readability-redundant-declaration,
bugprone-argument-comment,
-performance-for-range-copy,
-performance-inefficient-vector-operation,
-performance-unnecessary-copy-initialization,
-performance-move-const-arg,
-performance-no-automatic-move,
+performance-*,
+-performance-inefficient-string-concatenation,
+-performance-no-int-to-ptr,
+-performance-noexcept-move-constructor,
+-performance-unnecessary-value-param,
'
FormatStyle: file
CheckOptions:
diff --git a/src/minerfund.cpp b/src/minerfund.cpp
--- a/src/minerfund.cpp
+++ b/src/minerfund.cpp
@@ -77,8 +77,7 @@
continue;
}
- if (std::find(whitelist.begin(), whitelist.end(), address) !=
- whitelist.end()) {
+ if (whitelist.find(address) != whitelist.end()) {
return true;
}
}
diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp
--- a/src/qt/trafficgraphwidget.cpp
+++ b/src/qt/trafficgraphwidget.cpp
@@ -67,8 +67,8 @@
painter.drawLine(XMARGIN, YMARGIN + h, width() - XMARGIN, YMARGIN + h);
// decide what order of magnitude we are
- int base = floor(log10(fMax));
- float val = pow(10.0f, base);
+ int base = std::floor(std::log10(fMax));
+ float val = std::pow(10.0f, base);
const QString units = tr("KB/s");
const float yMarginText = 2.0;
diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp
--- a/src/rpc/util.cpp
+++ b/src/rpc/util.cpp
@@ -906,11 +906,11 @@
}
std::string RPCArg::GetFirstName() const {
- return m_names.substr(0, m_names.find("|"));
+ return m_names.substr(0, m_names.find('|'));
}
std::string RPCArg::GetName() const {
- CHECK_NONFATAL(std::string::npos == m_names.find("|"));
+ CHECK_NONFATAL(std::string::npos == m_names.find('|'));
return m_names;
}
diff --git a/src/util/bip32.cpp b/src/util/bip32.cpp
--- a/src/util/bip32.cpp
+++ b/src/util/bip32.cpp
@@ -25,7 +25,7 @@
}
// Finds whether it is hardened
uint32_t path = 0;
- size_t pos = item.find("'");
+ size_t pos = item.find('\'');
if (pos != std::string::npos) {
// The hardened tick can only be in the last index of the string
if (pos != item.size() - 1) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 20, 19:20 (3 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5865771
Default Alt Text
D18076.diff (2 KB)
Attached To
D18076: clang-tidy: Add more performance checks
Event Timeline
Log In to Comment