diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-30 20:46:01 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-08-30 20:46:01 +0200 |
| commit | 43bac17a2986ac2ea86e9d70c61268fa7e90ca4e (patch) | |
| tree | d259814b8c388e87bb02860405ff668a92434c44 /dev/ZKA/NewKit | |
| parent | 8a4f0e988a901e4fce5d32e3d5f9dbdc5f309863 (diff) | |
Fixed many issues with the kernel, and refactored it.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'dev/ZKA/NewKit')
| -rw-r--r-- | dev/ZKA/NewKit/Array.hxx | 12 | ||||
| -rw-r--r-- | dev/ZKA/NewKit/NewKit.hxx | 1 | ||||
| -rw-r--r-- | dev/ZKA/NewKit/Ref.hxx | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/dev/ZKA/NewKit/Array.hxx b/dev/ZKA/NewKit/Array.hxx index dcb6aede..22ee9f6a 100644 --- a/dev/ZKA/NewKit/Array.hxx +++ b/dev/ZKA/NewKit/Array.hxx @@ -37,9 +37,17 @@ namespace Kernel return true; } - SizeT Count() const + const SizeT Count() { - return N; + SizeT count = 0; + + for (SizeT i = 0; i < N; i++) + { + if (fArray[i]) + ++count; + } + + return count; } const T* CData() diff --git a/dev/ZKA/NewKit/NewKit.hxx b/dev/ZKA/NewKit/NewKit.hxx index e7766bde..1daa6af2 100644 --- a/dev/ZKA/NewKit/NewKit.hxx +++ b/dev/ZKA/NewKit/NewKit.hxx @@ -18,5 +18,4 @@ #include <NewKit/OwnPtr.hxx> #include <NewKit/Ref.hxx> #include <NewKit/Stream.hxx> -#include <KernelKit/ProcessHeap.hxx> #include <NewKit/Utils.hxx> diff --git a/dev/ZKA/NewKit/Ref.hxx b/dev/ZKA/NewKit/Ref.hxx index f23cfc08..41f003be 100644 --- a/dev/ZKA/NewKit/Ref.hxx +++ b/dev/ZKA/NewKit/Ref.hxx @@ -37,7 +37,7 @@ namespace Kernel } public: - T& operator->() const + T operator->() const { MUST_PASS(*fClass); return *fClass; |
