summaryrefslogtreecommitdiffhomepage
path: root/Private/NewKit/ArrayList.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
commit09dd11ddf800898c00ecb04a65fb5cd10fb481fa (patch)
treeeda0b4e23d6a71da7de3a78f0bb76ec3201dd2f9 /Private/NewKit/ArrayList.hpp
parentca83108fd138cc0398f900e6a6c0a53ad51aee31 (diff)
MHR-23: :boom: changes, reworked project tree.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewKit/ArrayList.hpp')
-rw-r--r--Private/NewKit/ArrayList.hpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/Private/NewKit/ArrayList.hpp b/Private/NewKit/ArrayList.hpp
deleted file mode 100644
index 31646472..00000000
--- a/Private/NewKit/ArrayList.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -------------------------------------------
-
- Copyright Mahrouss Logic
-
-------------------------------------------- */
-
-#pragma once
-
-#include <NewKit/Defines.hpp>
-
-namespace NewOS
-{
- template <typename T>
- class ArrayList final
- {
- public:
- explicit ArrayList(T* list)
- : fList(reinterpret_cast<T>(list))
- {
- }
-
- ~ArrayList() = default;
-
- ArrayList& operator=(const ArrayList&) = default;
- ArrayList(const ArrayList&) = default;
-
- T* Data()
- {
- return fList;
- }
-
- const T* CData()
- {
- return fList;
- }
-
- T& operator[](int index) const
- {
- return fList[index];
- }
-
- operator bool()
- {
- return fList;
- }
-
- private:
- T* fList;
-
- friend class InitHelpers;
- };
-
- template <typename ValueType>
- ArrayList<ValueType> make_list(ValueType val)
- {
- return ArrayList<ValueType>{val};
- }
-} // namespace NewOS