diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-23 19:13:48 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2025-03-23 19:15:17 +0100 |
| commit | a13e1c0911c0627184bc38f18c7fdda64447b3ad (patch) | |
| tree | 073a62c09bf216e85a3f310376640fa1805147f9 /dev/Kernel/NewKit/Array.h | |
| parent | 149fa096eb306d03686b3b67e813cf1a78e08cd0 (diff) | |
meta(kernel): Reworked repository's filesystem structure.
Removing useless parts of the project too.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Kernel/NewKit/Array.h')
| -rw-r--r-- | dev/Kernel/NewKit/Array.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/dev/Kernel/NewKit/Array.h b/dev/Kernel/NewKit/Array.h deleted file mode 100644 index 54c09636..00000000 --- a/dev/Kernel/NewKit/Array.h +++ /dev/null @@ -1,65 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - -------------------------------------------- */ - -#pragma once - -#include <KernelKit/DebugOutput.h> -#include <NewKit/ErrorOr.h> -#include <NewKit/Defines.h> - -namespace NeOS -{ - template <typename T, SizeT N> - class Array final - { - public: - explicit Array() = default; - ~Array() = default; - - Array& operator=(const Array&) = default; - Array(const Array&) = default; - - T& operator[](const SizeT& at) - { - MUST_PASS(at < this->Count()); - return fArray[at]; - } - - Boolean Empty() - { - return this->Count() > 0; - } - - const SizeT Capacity() - { - return N; - } - - const SizeT Count() - { - return N; - } - - const T* CData() - { - return fArray; - } - - operator bool() - { - return !Empty(); - } - - private: - T fArray[N]; - }; - - template <typename ValueType> - auto make_list(ValueType val) - { - return Array<ValueType, ARRAY_SIZE(val)>{val}; - } -} // namespace NeOS |
