From 6cefb96e9801bf2ab9cef5bf003fba86c47d9386 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 23 May 2020 12:39:00 +0200 Subject: [PATCH] AK: Allow NumericLimits.h to compile in a kernel context We explicitly disallow floating point numbers during kernel compilation so we have to #ifdef out those parts here. --- AK/NumericLimits.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AK/NumericLimits.h b/AK/NumericLimits.h index 29c792a5d2a..734688ae11b 100644 --- a/AK/NumericLimits.h +++ b/AK/NumericLimits.h @@ -111,6 +111,7 @@ struct NumericLimits { static constexpr bool is_signed() { return false; } }; +#ifndef KERNEL template<> struct NumericLimits { static constexpr float min() { return __FLT_MIN__; } @@ -131,6 +132,7 @@ struct NumericLimits { static constexpr long double max() { return __LDBL_MAX__; } static constexpr bool is_signed() { return true; } }; +#endif }