diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-27 19:47:09 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-27 19:47:09 +0100 |
| commit | 9b67443fe423bf6d84725183697a040e12296bce (patch) | |
| tree | e50a0bdd932305016ddbc5d9e205dc6b4688e5d9 /Private/NewKit | |
| parent | c3a0e70590694b7ab558e8c8f87906c638e4822a (diff) | |
CRT: System Object Runtime: initial commit.
Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Private/NewKit')
| -rw-r--r-- | Private/NewKit/Defines.hpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Private/NewKit/Defines.hpp b/Private/NewKit/Defines.hpp index a64b816d..6d27e4c5 100644 --- a/Private/NewKit/Defines.hpp +++ b/Private/NewKit/Defines.hpp @@ -69,7 +69,7 @@ using Void = void; using Lba = SSizeT; -enum class Endian : UChar { kLittle, kBig }; +enum class Endian : UChar { kEndianLittle, kEndianBig, kEndianMixed, kCount }; template <typename Args> Args &&forward(Args &arg) { @@ -80,22 +80,12 @@ template <typename Args> Args &&move(Args &&arg) { return static_cast<Args &&>(arg); } - -typedef UIntPtr _HandleCls; - -/// @brief Looks like an objc class, because it takes inspiration from it. -typedef struct _Handle { - _HandleCls _Cls; - void Release(_Handle *); - _Handle* Init(); - _Handle* Sel(_Handle*, ...); -} *Handle; } // namespace HCore #define DEDUCE_ENDIAN(address, value) \ (((reinterpret_cast<HCore::Char *>(address)[0]) == (value)) \ - ? (HCore::Endian::kBig) \ - : (HCore::Endian::kLittle)) + ? (HCore::Endian::kEndianBig) \ + : (HCore::Endian::kEndianLittle)) #define Yes (true) #define No (false) @@ -106,4 +96,4 @@ typedef struct _Handle { #undef INIT #endif // ifdef INIT -#define INIT(OBJ, TYPE, ...) TYPE OBJ = TYPE(__VA_ARGS__) +#define INIT(OBJ, TYPE, ...) TYPE OBJ = TYPE(__VA_ARGS__)
\ No newline at end of file |
