summaryrefslogtreecommitdiffhomepage
path: root/Private/NewKit/Array.hpp
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-10 15:41:08 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-10 15:41:08 +0100
commit5468ca71a59c9e24c1d392554e8f97f0c1705394 (patch)
tree1e8af47da852d4ad02a2ea48a967694c7bfc19c3 /Private/NewKit/Array.hpp
parent94d7585ae766d777f41d07b1a98051d12a6a0256 (diff)
Kernel: Reworked StorageKit to add AHCI support.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private/NewKit/Array.hpp')
-rw-r--r--Private/NewKit/Array.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/Private/NewKit/Array.hpp b/Private/NewKit/Array.hpp
index 3e1ee47d..c6153421 100644
--- a/Private/NewKit/Array.hpp
+++ b/Private/NewKit/Array.hpp
@@ -15,8 +15,8 @@ template <typename T, Size N>
class Array final
{
public:
- Array() {}
- ~Array() {}
+ explicit Array() = default;
+ ~Array() = default;
Array &operator=(const Array &) = default;
Array(const Array &) = default;
@@ -41,6 +41,18 @@ public:
return true;
}
+ SizeT Count() const
+ {
+ SizeT cntElems = 0UL;
+ for (auto Val : m_Array)
+ {
+ if (Val)
+ ++cntElems;
+ }
+
+ return cntElems;
+ }
+
const T *CData()
{
return m_Array;