summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2021-07-17 18:29:28 +0200
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2021-07-19 16:34:21 +0430
commited46d52252375be732841d980f9eec02ea7691f5 (patch)
tree60c8ff281cb3a07e2a33629184c6c0aec2a7f528 /Userland/Utilities
parentc5f6ba6e71ee7ebce578828fd35ba119e9a6b41a (diff)
downloadserenity-ed46d52252375be732841d980f9eec02ea7691f5.zip
Everywhere: Use AK/Math.h if applicable
AK's version should see better inlining behaviors, than the LibM one. We avoid mixed usage for now though. Also clean up some stale math includes and improper floatingpoint usage.
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/du.cpp1
-rw-r--r--Userland/Utilities/functrace.cpp1
-rw-r--r--Userland/Utilities/ntpquery.cpp2
3 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Utilities/du.cpp b/Userland/Utilities/du.cpp
index 4f218c9a0f..1782e56355 100644
--- a/Userland/Utilities/du.cpp
+++ b/Userland/Utilities/du.cpp
@@ -17,7 +17,6 @@
#include <LibCore/Object.h>
#include <inttypes.h>
#include <limits.h>
-#include <math.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
diff --git a/Userland/Utilities/functrace.cpp b/Userland/Utilities/functrace.cpp
index f94a7e2018..6cdc9a4389 100644
--- a/Userland/Utilities/functrace.cpp
+++ b/Userland/Utilities/functrace.cpp
@@ -17,7 +17,6 @@
#include <LibELF/Image.h>
#include <LibX86/Disassembler.h>
#include <LibX86/Instruction.h>
-#include <math.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/Userland/Utilities/ntpquery.cpp b/Userland/Utilities/ntpquery.cpp
index 802d16a054..a4c36ae616 100644
--- a/Userland/Utilities/ntpquery.cpp
+++ b/Userland/Utilities/ntpquery.cpp
@@ -292,7 +292,7 @@ int main(int argc, char** argv)
NtpTimestamp T3 = transmit_timestamp;
NtpTimestamp T4 = destination_timestamp;
auto timestamp_difference_in_seconds = [](NtpTimestamp from, NtpTimestamp to) {
- return static_cast<int64_t>(to - from) / pow(2.0, 32);
+ return static_cast<i64>(to - from) >> 32;
};
// The network round-trip time of the request.