Merge bitcoin/bitcoin#26758: refactor: Add performance-no-automatic-move clang-tidy check
9567bfeab9clang-tidy: Add `performance-no-automatic-move` check (Hennadii Stepanov) Pull request description: Split from bitcoin/bitcoin#26642 as [requested](https://github.com/bitcoin/bitcoin/pull/26642#discussion_r1054673201). For the problem description see https://clang.llvm.org/extra/clang-tidy/checks/performance/no-automatic-move.html. The following types are affected: - `std::pair<CAddress, NodeSeconds>` - `std::vector<CAddress>` - `UniValue`, also see bitcoin/bitcoin#25429 - `QColor` - `CBlock` - `MempoolAcceptResult` - `std::shared_ptr<CWallet>` - `std::optional<SelectionResult>` - `CTransactionRef`, which is `std::shared_ptr<const CTransaction>` ACKs for top commit: andrewtoth: ACK9567bfeab9aureleoules: ACK9567bfeab9Tree-SHA512: 9b6a5d539205b41d2c86402d384318ed2e1d89e66333ebd200a48fd7df3ce6f6c60a3e989eda5cc503fb34b8d82526f95e56776e1af51e63b49e3a1fef72dbcb
This commit is contained in:
12 files changed
+19
-17
No files matched your search
@@ -83,8 +83,8 @@ QColor PlatformStyle::TextColor() const
|
||||
QColor PlatformStyle::SingleColor() const
|
||||
{
|
||||
if (colorizeIcons) {
|
||||
const QColor colorHighlightBg(QApplication::palette().color(QPalette::Highlight));
|
||||
const QColor colorHighlightFg(QApplication::palette().color(QPalette::HighlightedText));
|
||||
QColor colorHighlightBg(QApplication::palette().color(QPalette::Highlight));
|
||||
QColor colorHighlightFg(QApplication::palette().color(QPalette::HighlightedText));
|
||||
const QColor colorText(QApplication::palette().color(QPalette::WindowText));
|
||||
const int colorTextLightness = colorText.lightness();
|
||||
if (abs(colorHighlightBg.lightness() - colorTextLightness) < abs(colorHighlightFg.lightness() - colorTextLightness)) {
|
||||
|
||||
Reference in new issue
Block a user