mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
AK: Make Types.h not export its functions if !USING_AK_GLOBALLY
This commit is contained in:
parent
b90f505409
commit
72514d6915
Notes:
sideshowbarker
2024-07-17 03:16:09 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/72514d6915 Pull-request: https://github.com/SerenityOS/serenity/pull/16475
1 changed files with 12 additions and 4 deletions
16
AK/Types.h
16
AK/Types.h
|
@ -38,7 +38,7 @@ using f128 = long double;
|
|||
#ifdef AK_OS_SERENITY
|
||||
|
||||
using size_t = __SIZE_TYPE__;
|
||||
using ssize_t = MakeSigned<size_t>;
|
||||
using ssize_t = AK::Detail::MakeSigned<size_t>;
|
||||
|
||||
using ptrdiff_t = __PTRDIFF_TYPE__;
|
||||
|
||||
|
@ -67,7 +67,7 @@ using __ptrdiff_t = __PTRDIFF_TYPE__;
|
|||
# endif
|
||||
|
||||
# if defined(AK_OS_WINDOWS)
|
||||
using ssize_t = MakeSigned<size_t>;
|
||||
using ssize_t = AK::Detail::MakeSigned<size_t>;
|
||||
using mode_t = unsigned short;
|
||||
# endif
|
||||
#endif
|
||||
|
@ -85,6 +85,8 @@ namespace std { // NOLINT(cert-dcl58-cpp) nullptr_t must be in ::std:: for some
|
|||
using nullptr_t = decltype(nullptr);
|
||||
}
|
||||
|
||||
namespace AK {
|
||||
|
||||
using nullptr_t = std::nullptr_t;
|
||||
|
||||
static constexpr FlatPtr explode_byte(u8 b)
|
||||
|
@ -117,8 +119,6 @@ enum class [[nodiscard]] TriState : u8 {
|
|||
Unknown
|
||||
};
|
||||
|
||||
namespace AK {
|
||||
|
||||
enum MemoryOrder {
|
||||
memory_order_relaxed = __ATOMIC_RELAXED,
|
||||
memory_order_consume = __ATOMIC_CONSUME,
|
||||
|
@ -129,3 +129,11 @@ enum MemoryOrder {
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
#if USING_AK_GLOBALLY
|
||||
using AK::align_down_to;
|
||||
using AK::align_up_to;
|
||||
using AK::MemoryOrder;
|
||||
using AK::nullptr_t;
|
||||
using AK::TriState;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue