mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
clang-tidy: Add performance-type-promotion-in-math-fn check
https://clang.llvm.org/extra/clang-tidy/checks/performance/type-promotion-in-math-fn.html
This commit is contained in:
@@ -10,6 +10,7 @@ performance-for-range-copy,
|
|||||||
performance-inefficient-vector-operation,
|
performance-inefficient-vector-operation,
|
||||||
performance-move-const-arg,
|
performance-move-const-arg,
|
||||||
performance-no-automatic-move,
|
performance-no-automatic-move,
|
||||||
|
performance-type-promotion-in-math-fn
|
||||||
performance-unnecessary-copy-initialization,
|
performance-unnecessary-copy-initialization,
|
||||||
readability-const-return-type,
|
readability-const-return-type,
|
||||||
readability-redundant-declaration,
|
readability-redundant-declaration,
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
|
|||||||
painter.drawLine(XMARGIN, YMARGIN + h, width() - XMARGIN, YMARGIN + h);
|
painter.drawLine(XMARGIN, YMARGIN + h, width() - XMARGIN, YMARGIN + h);
|
||||||
|
|
||||||
// decide what order of magnitude we are
|
// decide what order of magnitude we are
|
||||||
int base = floor(log10(fMax));
|
int base = std::floor(std::log10(fMax));
|
||||||
float val = pow(10.0f, base);
|
float val = std::pow(10.0f, base);
|
||||||
|
|
||||||
const QString units = tr("kB/s");
|
const QString units = tr("kB/s");
|
||||||
const float yMarginText = 2.0;
|
const float yMarginText = 2.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user