summaryrefslogtreecommitdiffhomepage
path: root/Kernel/NewKit/Array.hpp
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-06-19 07:59:04 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-06-19 07:59:04 +0000
commitb820eb6a5a7948597d81998137b05ddc0eb0dbad (patch)
treedb4eaea0b6863076c4f1476f361e2317823a663a /Kernel/NewKit/Array.hpp
parent36ff25861676cd1f5fb94b901fa59b015c614bc5 (diff)
parent6735570c44516661260546dadb81f0f5c238d1db (diff)
Merged in MHR-31 (pull request #16)
MHR-31: Round robin scheduler.
Diffstat (limited to 'Kernel/NewKit/Array.hpp')
-rw-r--r--Kernel/NewKit/Array.hpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/Kernel/NewKit/Array.hpp b/Kernel/NewKit/Array.hpp
index b8386c9a..b0b94584 100644
--- a/Kernel/NewKit/Array.hpp
+++ b/Kernel/NewKit/Array.hpp
@@ -21,13 +21,12 @@ namespace NewOS
Array& operator=(const Array&) = default;
Array(const Array&) = default;
- ErrorOr<T> operator[](Size At)
+ ErrorOr<T*> operator[](Size At)
{
if (At > N)
return {};
- kcout << "Returning element\r";
- return ErrorOr<T>(fArray[At]);
+ return ErrorOr<T*>(&fArray[At]);
}
Boolean Empty() const
@@ -43,14 +42,7 @@ namespace NewOS
SizeT Count() const
{
- SizeT cntElems = 0UL;
- for (auto Val : fArray)
- {
- if (Val)
- ++cntElems;
- }
-
- return cntElems;
+ return N;
}
const T* CData()