aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-07-16 20:30:56 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-07-16 20:33:31 +0200
commit2cc19e66c0bed3065cf7274dbc908bcb90b7502e (patch)
tree02e15eec9c095ee63766de94c5209f4c44fb8496 /lib
parent78c1a2db7c42b7d2cd5a036a5ef19bb95c679b86 (diff)
downloadlibquotient-2cc19e66c0bed3065cf7274dbc908bcb90b7502e.tar.gz
libquotient-2cc19e66c0bed3065cf7274dbc908bcb90b7502e.zip
logging.h: suppress clang-tidy warnings
Diffstat (limited to 'lib')
-rw-r--r--lib/logging.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/logging.h b/lib/logging.h
index 2599efbf..1fafa04b 100644
--- a/lib/logging.h
+++ b/lib/logging.h
@@ -69,12 +69,13 @@ inline qint64 profilerMinNsecs()
*/
inline QDebug operator<<(QDebug debug_object, Quotient::QDebugManip qdm)
{
- return qdm(debug_object);
+ return qdm(debug_object); // NOLINT(performance-unnecessary-value-param)
}
inline QDebug operator<<(QDebug debug_object, QElapsedTimer et)
{
- // Keep 3 decimal digits (the first division is int, the second is float)
- debug_object << et.nsecsElapsed() / 1000 / 1000.0 << "ms";
+ // NOLINTNEXTLINE(bugprone-integer-division)
+ debug_object << static_cast<double>(et.nsecsElapsed() / 1000) / 1000
+ << "ms"; // Show in ms with 3 decimal digits precision
return debug_object;
}