diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-05 23:29:42 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-05 23:29:42 +0100 |
| commit | a5f3fdf32ba6aa34a5dd05eeb807446a9f046393 (patch) | |
| tree | 3695547276413e1f4608a667afaceb66d85b0a7c /src/kernel | |
| parent | afdddeed77592bbbcd9b47611b6218a74d4ee987 (diff) | |
[FEAT] CoreGfx: Introduce CGVec container, CoreAccess.h improvements.
[CHORE] Kernel/Boot: format.sh.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel')
| -rw-r--r-- | src/kernel/FSKit/Ext2+IFS.h | 2 | ||||
| -rw-r--r-- | src/kernel/FSKit/OpenHeFS.h | 6 | ||||
| -rw-r--r-- | src/kernel/FirmwareKit/EFI/EFI.h | 106 | ||||
| -rw-r--r-- | src/kernel/HALKit/AMD64/Paging.h | 4 | ||||
| -rw-r--r-- | src/kernel/HALKit/ARM64/Paging.h | 16 | ||||
| -rw-r--r-- | src/kernel/KernelKit/CoreProcessScheduler.h | 50 | ||||
| -rw-r--r-- | src/kernel/KernelKit/DriveMgr.h | 2 | ||||
| -rw-r--r-- | src/kernel/KernelKit/HardwareThreadScheduler.h | 6 | ||||
| -rw-r--r-- | src/kernel/KernelKit/ILoader.h | 6 | ||||
| -rw-r--r-- | src/kernel/KernelKit/PCI/DMA.h | 2 | ||||
| -rw-r--r-- | src/kernel/NeKit/Config.h | 6 | ||||
| -rw-r--r-- | src/kernel/NeKit/Macros.h | 4 | ||||
| -rw-r--r-- | src/kernel/NeKit/Utils.h | 6 | ||||
| -rw-r--r-- | src/kernel/NeKit/Vettable.h | 8 |
14 files changed, 84 insertions, 140 deletions
diff --git a/src/kernel/FSKit/Ext2+IFS.h b/src/kernel/FSKit/Ext2+IFS.h index 06450a76..49ced627 100644 --- a/src/kernel/FSKit/Ext2+IFS.h +++ b/src/kernel/FSKit/Ext2+IFS.h @@ -31,7 +31,7 @@ class Ext2Context final { } } - Ext2Context(const Ext2Context&) = delete; + Ext2Context(const Ext2Context&) = delete; Ext2Context& operator=(const Ext2Context&) = delete; Ext2Context(Ext2Context&& other) : drive(other.drive), superblock(other.superblock) { diff --git a/src/kernel/FSKit/OpenHeFS.h b/src/kernel/FSKit/OpenHeFS.h index 98b16b28..2bc05213 100644 --- a/src/kernel/FSKit/OpenHeFS.h +++ b/src/kernel/FSKit/OpenHeFS.h @@ -266,7 +266,7 @@ inline UInt32 hefs_hour_get(ATime raw_atime) { /// @return the minute value. /// @note The minute is stored in the lower 8 bits of the ATime value. inline UInt32 hefs_minute_get(ATime raw_atime) { - return (raw_atime) &0xFF; + return (raw_atime) & 0xFF; } inline constexpr UInt32 kOpenHeFSBaseYear = 1970; @@ -386,10 +386,10 @@ class HeFileSystemParser final { ~HeFileSystemParser() = default; public: - HeFileSystemParser(const HeFileSystemParser&) = delete; + HeFileSystemParser(const HeFileSystemParser&) = delete; HeFileSystemParser& operator=(const HeFileSystemParser&) = delete; - HeFileSystemParser(HeFileSystemParser&&) = delete; + HeFileSystemParser(HeFileSystemParser&&) = delete; HeFileSystemParser& operator=(HeFileSystemParser&&) = delete; public: diff --git a/src/kernel/FirmwareKit/EFI/EFI.h b/src/kernel/FirmwareKit/EFI/EFI.h index 4dc85ab6..6deb340c 100644 --- a/src/kernel/FirmwareKit/EFI/EFI.h +++ b/src/kernel/FirmwareKit/EFI/EFI.h @@ -55,7 +55,7 @@ typedef Char16 EfiChar16Type; /// @brief Core Handle Kind /// Self is like NT's Win32 HANDLE type. typedef struct EfiHandle { -} * EfiHandlePtr; +}* EfiHandlePtr; /* UEFI uses wide characters by default. */ typedef WideChar EfiCharType; @@ -237,64 +237,42 @@ typedef struct EfiTableHeader { UInt32 Reserved; } EfiTableHeader; -#define EFI_ACPI_TABLE_PROTOCOL_GUID \ - { \ - 0xffe06bdd, 0x6107, 0x46a6, { 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c } \ - } +#define EFI_ACPI_TABLE_PROTOCOL_GUID \ + {0xffe06bdd, 0x6107, 0x46a6, {0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c}} -#define EFI_LOAD_FILE_PROTOCOL_GUID \ - { \ - 0x56EC3091, 0x954C, 0x11d2, { 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } +#define EFI_LOAD_FILE_PROTOCOL_GUID \ + {0x56EC3091, 0x954C, 0x11d2, {0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}} -#define EFI_LOAD_FILE2_PROTOCOL_GUID \ - { \ - 0x4006c0c1, 0xfcb3, 0x403e, { 0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d } \ - } +#define EFI_LOAD_FILE2_PROTOCOL_GUID \ + {0x4006c0c1, 0xfcb3, 0x403e, {0x99, 0x6d, 0x4a, 0x6c, 0x87, 0x24, 0xe0, 0x6d}} -#define EFI_LOADED_IMAGE_PROTOCOL_GUID \ - { \ - 0x5B1B31A1, 0x9562, 0x11d2, { 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \ - } +#define EFI_LOADED_IMAGE_PROTOCOL_GUID \ + {0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B}} -#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ - { \ - 0x9042a9de, 0x23dc, 0x4a38, { 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a } \ - } +#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ + {0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a}} -#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \ - { \ - 0xA19832B9, 0xAC25, 0x11D3, { 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \ - } +#define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \ + {0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d}} #define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000 -#define EFI_IP4_PROTOCOL_GUID \ - { \ - 0x41d94cd2, 0x35b6, 0x455a, { 0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd } \ - } +#define EFI_IP4_PROTOCOL_GUID \ + {0x41d94cd2, 0x35b6, 0x455a, {0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd}} #define EFI_LOADED_IMAGE_PROTOCOL_REVISION 0x1000 -#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \ - { \ - 0x0964e5b22, 0x6459, 0x11d2, { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } +#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \ + {0x0964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}} -#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ - { \ - 0xbc62157e, 0x3e33, 0x4fec, { 0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf } \ - } +#define EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID \ + {0xbc62157e, 0x3e33, 0x4fec, {0x99, 0x20, 0x2d, 0x3b, 0x36, 0xd7, 0x50, 0xdf}} -#define EFI_DEVICE_PATH_PROTOCOL_GUID \ - { \ - 0x9576e91, 0x6d3f, 0x11d2, { 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } +#define EFI_DEVICE_PATH_PROTOCOL_GUID \ + {0x9576e91, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b}} -#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \ - { \ - 0x0964e5b22, 0x6459, 0x11d2, { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } +#define EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID \ + {0x0964e5b22, 0x6459, 0x11d2, {0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}} typedef UInt64(EfiImageUnload)(EfiHandlePtr ImageHandle); @@ -349,17 +327,17 @@ typedef struct { typedef EFI_STATUS(EFIAPI* EFI_SIMPLE_NETWORK_TRANSMIT)(IN EFI_SIMPLE_NETWORK_PROTOCOL* This, IN UInt32 HeaderSize, IN UInt32 BufferSize, - IN Void* Buffer, - IN EfiMacAddress* SrcAddr OPTIONAL, + IN Void* Buffer, + IN EfiMacAddress* SrcAddr OPTIONAL, IN EfiMacAddress* DestAddr OPTIONAL, - IN UInt16* Protocol OPTIONAL); + IN UInt16* Protocol OPTIONAL); typedef EFI_STATUS(EFIAPI* EFI_SIMPLE_NETWORK_RECEIVE)(IN EFI_SIMPLE_NETWORK_PROTOCOL* This, - OUT UInt32* HeaderSize OPTIONAL, + OUT UInt32* HeaderSize OPTIONAL, IN OUT UInt32* BufferSize, OUT Void* Buffer, - OUT EfiMacAddress* SrcAddr OPTIONAL, + OUT EfiMacAddress* SrcAddr OPTIONAL, OUT EfiMacAddress* DestAddr OPTIONAL, - OUT UInt16* Protocol OPTIONAL); + OUT UInt16* Protocol OPTIONAL); typedef struct EFI_SIMPLE_NETWORK_PROTOCOL { UInt64 Revision; @@ -504,10 +482,8 @@ typedef struct EFI_GUID EFI_FINAL { * Protocol stuff... */ -#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \ - { \ - 0x387477c1, 0x69c7, 0x11d2, { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } +#define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \ + {0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}} /** some helpers */ #define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 @@ -605,7 +581,7 @@ typedef struct { } EfiInputKey; typedef EfiStatusType(EFI_API* EfiInputReadKey)(IN EfiSimpleTextInputProtocol* This, - OUT EfiInputKey* Key); + OUT EfiInputKey* Key); typedef EfiStatusType(EFI_API* EfiInputReset)(IN EfiSimpleTextInputProtocol* This, IN Boolean ExtendedChk); @@ -663,7 +639,7 @@ typedef struct EfiSystemTable { struct { EFI_GUID VendorGUID; VoidPtr VendorTable; - } * ConfigurationTable; + }* ConfigurationTable; } EfiSystemTable; #define kEfiOk 0 @@ -724,10 +700,8 @@ enum { #define EFI_EXTRA_DESCRIPTOR_SIZE 8 -#define EFI_MP_SERVICES_PROTOCOL_GUID \ - { \ - 0x3fdda605, 0xa76e, 0x4f46, { 0xad, 0x29, 0x12, 0xf4, 0x53, 0x1b, 0x3d, 0x08 } \ - } +#define EFI_MP_SERVICES_PROTOCOL_GUID \ + {0x3fdda605, 0xa76e, 0x4f46, {0xad, 0x29, 0x12, 0xf4, 0x53, 0x1b, 0x3d, 0x08}} #define PROCESSOR_AS_BSP_BIT 0x00000001 #define PROCESSOR_ENABLED_BIT 0x00000002 @@ -823,10 +797,8 @@ typedef struct EfiTime { UInt8 Pad2; } EfiTime; -#define EFI_FILE_INFO_GUID \ - { \ - 0x09576e92, 0x6d3f, 0x11d2, { 0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ - } +#define EFI_FILE_INFO_GUID \ + {0x09576e92, 0x6d3f, 0x11d2, {0x8e, 0x39, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b}} struct EfiFileInfo EFI_FINAL { /// @brief Structure size. @@ -894,8 +866,8 @@ typedef EfiStatusType EFI_API (*EfiMpServicesStartupThisAP)( IN Void* ProcedureArgument OPTIONAL, OUT Boolean* Finished OPTIONAL); typedef EfiStatusType EFI_API (*EfiMpServicesDisableThisAP)(IN struct _EfiMpServicesProtocol* Self, - IN UInt32 ProcessorNumber, - IN Boolean EnableAP, + IN UInt32 ProcessorNumber, + IN Boolean EnableAP, IN UInt32* HealthFlag OPTIONAL); typedef EfiStatusType EFI_API (*EfiMpServicesWhoAmI)(IN struct _EfiMpServicesProtocol* Self, diff --git a/src/kernel/HALKit/AMD64/Paging.h b/src/kernel/HALKit/AMD64/Paging.h index 1fbde52c..89d48e8a 100644 --- a/src/kernel/HALKit/AMD64/Paging.h +++ b/src/kernel/HALKit/AMD64/Paging.h @@ -56,7 +56,9 @@ namespace Detail { kPageEnable = 31, }; - inline UInt8 control_register_cast(ControlRegisterBits reg) { return static_cast<UInt8>(reg); } + inline UInt8 control_register_cast(ControlRegisterBits reg) { + return static_cast<UInt8>(reg); + } } // namespace Detail auto mm_alloc_bitmap(Boolean wr, Boolean user, SizeT size, Bool is_page, SizeT pad = 0) -> VoidPtr; diff --git a/src/kernel/HALKit/ARM64/Paging.h b/src/kernel/HALKit/ARM64/Paging.h index bf062e3a..1984a9f2 100644 --- a/src/kernel/HALKit/ARM64/Paging.h +++ b/src/kernel/HALKit/ARM64/Paging.h @@ -40,14 +40,10 @@ /// Long format address range -#define cPageMAll \ - { 0b000, 0b000 } -#define cPageMToMax(M) \ - { M, 0b000 } -#define cPageMaxToM(M) \ - { 0b000, M } -#define cPageMToN(M, N) \ - { M, N } +#define cPageMAll {0b000, 0b000} +#define cPageMToMax(M) {M, 0b000} +#define cPageMaxToM(M) {0b000, M} +#define cPageMToN(M, N) {M, N} namespace Kernel::HAL { struct PACKED PTE_4KB final { @@ -85,7 +81,9 @@ namespace Detail { PageEnable = 31, }; - inline UInt8 control_register_cast(ControlRegisterBits reg) { return static_cast<UInt8>(reg); } + inline UInt8 control_register_cast(ControlRegisterBits reg) { + return static_cast<UInt8>(reg); + } } // namespace Detail struct PDE_4KB final { diff --git a/src/kernel/KernelKit/CoreProcessScheduler.h b/src/kernel/KernelKit/CoreProcessScheduler.h index d3838aa3..f032c705 100644 --- a/src/kernel/KernelKit/CoreProcessScheduler.h +++ b/src/kernel/KernelKit/CoreProcessScheduler.h @@ -59,19 +59,11 @@ struct ProcessHeapTree final { TreeKind Color{TreeKind::kBlackTreeKind}; - struct ProcessHeapTree<T>* Parent { - nullptr - }; - struct ProcessHeapTree<T>* Child { - nullptr - }; - - struct ProcessHeapTree<T>* Prev { - nullptr - }; - struct ProcessHeapTree<T>* Next { - nullptr - }; + struct ProcessHeapTree<T>* Parent{nullptr}; + struct ProcessHeapTree<T>* Child{nullptr}; + + struct ProcessHeapTree<T>* Prev{nullptr}; + struct ProcessHeapTree<T>* Next{nullptr}; }; template <typename T> @@ -86,21 +78,13 @@ struct ProcessFileTree final { TreeKind Color{TreeKind::kBlackTreeKind}; - struct ProcessFileTree<T>* Parent { - nullptr - }; + struct ProcessFileTree<T>* Parent{nullptr}; - struct ProcessFileTree<T>* Child { - nullptr - }; + struct ProcessFileTree<T>* Child{nullptr}; - struct ProcessFileTree<T>* Prev { - nullptr - }; + struct ProcessFileTree<T>* Prev{nullptr}; - struct ProcessFileTree<T>* Next { - nullptr - }; + struct ProcessFileTree<T>* Next{nullptr}; }; template <typename T> @@ -121,21 +105,13 @@ struct ProcessSpecialTree final { TreeKind Color{TreeKind::kBlackTreeKind}; - struct ProcessSpecialTree<T>* Parent { - nullptr - }; + struct ProcessSpecialTree<T>* Parent{nullptr}; - struct ProcessSpecialTree<T>* Child { - nullptr - }; + struct ProcessSpecialTree<T>* Child{nullptr}; - struct ProcessSpecialTree<T>* Prev { - nullptr - }; + struct ProcessSpecialTree<T>* Prev{nullptr}; - struct ProcessSpecialTree<T>* Next { - nullptr - }; + struct ProcessSpecialTree<T>* Next{nullptr}; }; /***********************************************************************************/ diff --git a/src/kernel/KernelKit/DriveMgr.h b/src/kernel/KernelKit/DriveMgr.h index 7179f930..f4ca294e 100644 --- a/src/kernel/KernelKit/DriveMgr.h +++ b/src/kernel/KernelKit/DriveMgr.h @@ -72,7 +72,7 @@ struct DriveTrait final { Void (*fOutput)(DrivePacket& packet){nullptr}; Void (*fVerify)(DrivePacket& packet){nullptr}; Void (*fInit)(DrivePacket& packet){nullptr}; - const Char* (*fProtocol)(Void){nullptr}; + const Char* (*fProtocol)(Void) {nullptr}; }; namespace Probe { diff --git a/src/kernel/KernelKit/HardwareThreadScheduler.h b/src/kernel/KernelKit/HardwareThreadScheduler.h index de29eae4..8e1caf39 100644 --- a/src/kernel/KernelKit/HardwareThreadScheduler.h +++ b/src/kernel/KernelKit/HardwareThreadScheduler.h @@ -63,10 +63,10 @@ class HardwareThread final { BOOL IsWakeup(); public: - HAL::StackFramePtr StackFrame(); + HAL::StackFramePtr StackFrame(); _Output const ThreadKind& Kind(); BOOL IsBusy(); - _Output const ThreadID& ID(); + _Output const ThreadID& ID(); private: HAL::StackFramePtr fStack{}; @@ -101,7 +101,7 @@ class HardwareThreadScheduler final : public ISchedulable { public: Ref<HardwareThread*> operator[](SizeT idx); bool operator!(); - operator bool(); + operator bool(); Bool IsUser() override { return Yes; } diff --git a/src/kernel/KernelKit/ILoader.h b/src/kernel/KernelKit/ILoader.h index 005a6987..2dd8ccc0 100644 --- a/src/kernel/KernelKit/ILoader.h +++ b/src/kernel/KernelKit/ILoader.h @@ -25,9 +25,9 @@ class ILoader { public: virtual _Output ErrorOr<VoidPtr> GetBlob() { return ErrorOr<VoidPtr>{}; } - virtual _Output const Char* AsString() { return "(null)"; } - virtual _Output const Char* MIME() { return "*/*"; } - virtual _Output const Char* Path() { return "(null)"; } + virtual _Output const Char* AsString() { return "(null)"; } + virtual _Output const Char* MIME() { return "*/*"; } + virtual _Output const Char* Path() { return "(null)"; } virtual _Output ErrorOr<VoidPtr> FindStart() { return ErrorOr<VoidPtr>{}; } virtual _Output ErrorOr<VoidPtr> FindSymbol(_Input const Char*, _Input Int32) { return ErrorOr<VoidPtr>{}; diff --git a/src/kernel/KernelKit/PCI/DMA.h b/src/kernel/KernelKit/PCI/DMA.h index e1006d4a..ea708969 100644 --- a/src/kernel/KernelKit/PCI/DMA.h +++ b/src/kernel/KernelKit/PCI/DMA.h @@ -46,7 +46,7 @@ class DMAWrapper final { T* Get(UIntPtr off = 0); public: - operator bool(); + operator bool(); bool operator!(); public: diff --git a/src/kernel/NeKit/Config.h b/src/kernel/NeKit/Config.h index 1d5083a7..effa0696 100644 --- a/src/kernel/NeKit/Config.h +++ b/src/kernel/NeKit/Config.h @@ -16,7 +16,7 @@ #define NE_ICODEC \ final: \ - public \ + public \ ::Kernel::ICodec /// @brief The **NeKernel** namespace. @@ -112,12 +112,12 @@ inline Args&& move(Args&& arg) { template <class Type> concept IsSerializable = requires() { - {Type::kValue}; + { Type::kValue }; }; template <class Type> concept IsNotSerializable = requires() { - {!Type::kValue}; + { !Type::kValue }; }; /// @brief Encoding interface, used as a proxy to convert T to Char* diff --git a/src/kernel/NeKit/Macros.h b/src/kernel/NeKit/Macros.h index 33f01234..dabf593d 100644 --- a/src/kernel/NeKit/Macros.h +++ b/src/kernel/NeKit/Macros.h @@ -15,7 +15,7 @@ #endif #ifndef kib_cast -#define kib_cast(X) (Kernel::UInt64)((X) *1024) +#define kib_cast(X) (Kernel::UInt64)((X) * 1024) #endif #ifndef MIB @@ -116,7 +116,7 @@ #define NE_UNUSED(X) ((Kernel::Void) X) #ifndef RGB -#define RGB(R, G, B) ((Kernel::UInt32)((0xFF << 24) | ((R) << 16) | ((G) << 8) | (B))) +#define RGB(R, G, B) ((Kernel::UInt32) ((0xFF << 24) | ((R) << 16) | ((G) << 8) | (B))) #endif // !RGB #ifdef __NE_AMD64__ diff --git a/src/kernel/NeKit/Utils.h b/src/kernel/NeKit/Utils.h index a42078de..618f968e 100644 --- a/src/kernel/NeKit/Utils.h +++ b/src/kernel/NeKit/Utils.h @@ -54,9 +54,9 @@ inline constexpr SizeT oe_string_len(const CharType* str) { if (!str) return 0; #if __cplusplus == 202302L - if - consteval { return ARRAY_SIZE(str); } - else { + if consteval { + return ARRAY_SIZE(str); + } else { SizeT len{0}; while (str[len] != 0) ++len; return len; diff --git a/src/kernel/NeKit/Vettable.h b/src/kernel/NeKit/Vettable.h index 4c6bc6ab..9792dde9 100644 --- a/src/kernel/NeKit/Vettable.h +++ b/src/kernel/NeKit/Vettable.h @@ -15,14 +15,10 @@ namespace Kernel { template <class Type> -concept IsVettable = requires(Type) { - (Type::kVettable); -}; +concept IsVettable = requires(Type) { (Type::kVettable); }; template <class Type> -concept IsUnVettable = requires(Type) { - (Type::kUnvettable); -}; +concept IsUnVettable = requires(Type) { (Type::kUnvettable); }; } // namespace Kernel #endif // !__NE_KIT_VETTABLE_H__ |
