Commit graph

9 commits

Author SHA1 Message Date
Andreas Kling ae3ffdd521 AK: Make it possible to not using AK classes into the global namespace
This patch adds the `USING_AK_GLOBALLY` macro which is enabled by
default, but can be overridden by build flags.

This is a step towards integrating Jakt and AK types.
2022-11-26 15:51:34 +01:00
Andrew Kaster 07f4e91b94 AK: Use proper type for bool NumericLimits::min and max specialization
We had these declared as returning char, which looks like a copy paste
error. Found by clang-tidy.
2021-11-14 22:52:35 +01:00
Jelle Raaijmakers 2137675047 AK/NumericLimits: Add lowest() for floating-point types 2021-05-22 13:38:34 +01:00
Stephan Unverwerth 0a557d65a0 AK: Add epsilon() to NumericLimits for float, double, long double 2021-05-08 10:13:22 +02:00
Brian Gianforcaro 1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
asynts f221a95a71 AK: Add NumericLimits specialization for char.
This is yet another bug because of the 'char'/'signed char'/'unsigned char' shit.
2020-09-29 16:14:58 +02:00
Andreas Kling 70cb4491d7 AK: Use "signed char" as the opposite of "unsigned char"
I totally forgot about the C++ basics here. There are three distinct
types: "char", "signed char" and "unsigned char". Whether "char" is
signed or unsigned is implementation specific.
2020-07-18 17:57:40 +02:00
Andreas Kling 6cefb96e98 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.
2020-05-23 15:25:43 +02:00
Andreas Kling ca2052ae4a AK: Add a simple NumericLimits<T> template
This provides min(), max() and is_signed() for the basic integer types.
2020-04-15 16:58:46 +02:00