aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-03-26 20:18:03 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-03-26 20:18:03 +0100
commit24004372302adfc0e7cb36f8db6830694bf050e9 (patch)
tree18a5950810b1ddf5798e4447ad4cb1a204c441ea /src/qt
parent7e975e6cf86617346c1d8e2568f74a0252c03857 (diff)
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
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/trafficgraphwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp
index 08789c1048..fb6f2cb464 100644
--- a/src/qt/trafficgraphwidget.cpp
+++ b/src/qt/trafficgraphwidget.cpp
@@ -68,8 +68,8 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
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;