1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 15:07:45 +00:00

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.
This commit is contained in:
Andreas Kling 2022-11-26 12:18:30 +01:00
parent e50a43652e
commit ae3ffdd521
124 changed files with 276 additions and 12 deletions

View file

@ -698,16 +698,17 @@ struct Formatter<ErrorOr<T, ErrorType>> : Formatter<FormatString> {
} // namespace AK
#ifdef KERNEL
#if USING_AK_GLOBALLY
# ifdef KERNEL
using AK::critical_dmesgln;
using AK::dmesgln;
#else
# else
using AK::out;
using AK::outln;
using AK::warn;
using AK::warnln;
#endif
# endif
using AK::dbgln;
@ -715,8 +716,10 @@ using AK::CheckedFormatString;
using AK::FormatIfSupported;
using AK::FormatString;
#define dbgln_if(flag, fmt, ...) \
do { \
if constexpr (flag) \
dbgln(fmt, ##__VA_ARGS__); \
} while (0)
# define dbgln_if(flag, fmt, ...) \
do { \
if constexpr (flag) \
dbgln(fmt, ##__VA_ARGS__); \
} while (0)
#endif