summaryrefslogtreecommitdiffhomepage
path: root/dev/user/Macros.h
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-04-25 13:08:33 +0200
committerAmlal <amlal@nekernel.org>2025-04-25 13:08:33 +0200
commitfb790b07aeba8e22e4190cf3e1834d11ecde6c96 (patch)
tree4cec7d1b321307b1d5935577631dae116a658a37 /dev/user/Macros.h
parent63a2d92c5dfe976175cda024ec01905d11b43738 (diff)
dev: better .clang-format, ran format command.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/user/Macros.h')
-rw-r--r--dev/user/Macros.h57
1 files changed, 28 insertions, 29 deletions
diff --git a/dev/user/Macros.h b/dev/user/Macros.h
index a0dfcb00..0bb98a59 100644
--- a/dev/user/Macros.h
+++ b/dev/user/Macros.h
@@ -19,7 +19,7 @@ Purpose: libsci Macros header.
#define ATTRIBUTE(X) __attribute__((X))
#define IMPORT_CXX extern "C++"
-#define IMPORT_C extern "C"
+#define IMPORT_C extern "C"
#define DEPRECATED ATTRIBUTE(deprecated)
@@ -42,12 +42,12 @@ typedef void Void;
#endif
#define YES true
-#define NO false
+#define NO false
typedef __UINT64_TYPE__ UInt64;
typedef __UINT32_TYPE__ UInt32;
typedef __UINT16_TYPE__ UInt16;
-typedef __UINT8_TYPE__ UInt8;
+typedef __UINT8_TYPE__ UInt8;
typedef __SIZE_TYPE__ SizeT;
@@ -56,29 +56,29 @@ typedef __INT32_TYPE__ SInt32;
typedef __INT16_TYPE__ SInt16;
typedef __INT8_TYPE__ SInt8;
-typedef void* VoidPtr;
+typedef void* VoidPtr;
typedef __UINTPTR_TYPE__ UIntPtr;
-typedef char Char;
+typedef char Char;
#ifdef __cplusplus
typedef decltype(nullptr) nullPtr;
-typedef nullPtr NullPtr;
+typedef nullPtr NullPtr;
-#define SCI_COPY_DELETE(KLASS) \
- KLASS& operator=(const KLASS&) = delete; \
- KLASS(const KLASS&) = delete;
+#define SCI_COPY_DELETE(KLASS) \
+ KLASS& operator=(const KLASS&) = delete; \
+ KLASS(const KLASS&) = delete;
-#define SCI_COPY_DEFAULT(KLASS) \
- KLASS& operator=(const KLASS&) = default; \
- KLASS(const KLASS&) = default;
+#define SCI_COPY_DEFAULT(KLASS) \
+ KLASS& operator=(const KLASS&) = default; \
+ KLASS(const KLASS&) = default;
-#define SCI_MOVE_DELETE(KLASS) \
- KLASS& operator=(KLASS&&) = delete; \
- KLASS(KLASS&&) = delete;
+#define SCI_MOVE_DELETE(KLASS) \
+ KLASS& operator=(KLASS&&) = delete; \
+ KLASS(KLASS&&) = delete;
-#define SCI_MOVE_DEFAULT(KLASS) \
- KLASS& operator=(KLASS&&) = default; \
- KLASS(KLASS&&) = default;
+#define SCI_MOVE_DEFAULT(KLASS) \
+ KLASS& operator=(KLASS&&) = default; \
+ KLASS(KLASS&&) = default;
#endif
@@ -87,9 +87,8 @@ IMPORT_C void _rtl_assert(Bool expr, const Char* origin);
#define MUST_PASS(X) _rtl_assert(X, __FILE__)
#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(X) \
- (((sizeof(X) / sizeof(*(X))) / \
- (static_cast<SizeT>(!(sizeof(X) % sizeof(*(X)))))))
+#define ARRAY_SIZE(X) \
+ (((sizeof(X) / sizeof(*(X))) / (static_cast<SizeT>(!(sizeof(X) % sizeof(*(X)))))))
#endif
#ifndef KIB
@@ -97,31 +96,31 @@ IMPORT_C void _rtl_assert(Bool expr, const Char* origin);
#endif
#ifndef kib_cast
-#define kib_cast(X) (UInt64)((X)*1024)
+#define kib_cast(X) (UInt64)((X) * 1024)
#endif
#ifndef MIB
-#define MIB(X) (UInt64)((UInt64)KIB(X) / 1024)
+#define MIB(X) (UInt64)((UInt64) KIB(X) / 1024)
#endif
#ifndef mib_cast
-#define mib_cast(X) (UInt64)((UInt64)kib_cast(X) * 1024)
+#define mib_cast(X) (UInt64)((UInt64) kib_cast(X) * 1024)
#endif
#ifndef GIB
-#define GIB(X) (UInt64)((UInt64)MIB(X) / 1024)
+#define GIB(X) (UInt64)((UInt64) MIB(X) / 1024)
#endif
#ifndef gib_cast
-#define gib_cast(X) (UInt64)((UInt64)mib_cast(X) * 1024)
+#define gib_cast(X) (UInt64)((UInt64) mib_cast(X) * 1024)
#endif
#ifndef TIB
-#define TIB(X) (UInt64)((UInt64)GIB(X) / 1024)
+#define TIB(X) (UInt64)((UInt64) GIB(X) / 1024)
#endif
#ifndef tib_cast
-#define tib_cast(X) ((UInt64)gib_cast(X) * 1024)
+#define tib_cast(X) ((UInt64) gib_cast(X) * 1024)
#endif
-#define SCI_UNUSED(X) ((void)X)
+#define SCI_UNUSED(X) ((void) X)