summaryrefslogtreecommitdiff
path: root/AK/Types.h
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-12-13 08:37:01 +0330
committerAndreas Kling <kling@serenityos.org>2022-12-14 11:44:32 +0100
commit72514d6915a685552a258d2e4c85d9d52184c1b6 (patch)
tree84f858bb9f8dde15ec13851fe2b65f49affa26c1 /AK/Types.h
parentb90f50540941bf87b6ec995133b8de8f44f9ce5f (diff)
downloadserenity-72514d6915a685552a258d2e4c85d9d52184c1b6.zip
AK: Make Types.h not export its functions if !USING_AK_GLOBALLY
Diffstat (limited to 'AK/Types.h')
-rw-r--r--AK/Types.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/AK/Types.h b/AK/Types.h
index 0bf39d30bf..32a8607d1c 100644
--- a/AK/Types.h
+++ b/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