summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NeKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-12-18 19:38:22 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-12-18 19:38:22 +0100
commitf651858b579138d5df0f89363879825513ece227 (patch)
tree7f9fc7f18d7948e4c969b3901e9ca6559f4941d9 /src/kernel/NeKit
parented6d2f6007b572b907e3cb11b4303c13d1572c9c (diff)
chore: MKFS library improvements on documentation.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/NeKit')
-rw-r--r--src/kernel/NeKit/Atom.h19
-rw-r--r--src/kernel/NeKit/InitializerList.h10
-rw-r--r--src/kernel/NeKit/Ref.h2
3 files changed, 19 insertions, 12 deletions
diff --git a/src/kernel/NeKit/Atom.h b/src/kernel/NeKit/Atom.h
index 7deff14e..7c5177fe 100644
--- a/src/kernel/NeKit/Atom.h
+++ b/src/kernel/NeKit/Atom.h
@@ -22,14 +22,21 @@ class Atom final {
public:
using Type = TypeAtomic;
-
+
const TypeAtomic& operator[](const SizeT& bit) { return (fArrayOfAtoms & (1 << bit)); }
- void operator|(const SizeT& bit) { fArrayOfAtoms |= (1 << bit); }
- Atom& operator|=(const SizeT& bit) { this->operator|(bit); return *this; }
-
- friend bool operator==(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { return atomic[idx] == idx; }
- friend bool operator!=(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { return atomic[idx] != idx; }
+ void operator|(const SizeT& bit) { fArrayOfAtoms |= (1 << bit); }
+ Atom& operator|=(const SizeT& bit) {
+ this->operator|(bit);
+ return *this;
+ }
+
+ friend bool operator==(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) {
+ return atomic[idx] == idx;
+ }
+ friend bool operator!=(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) {
+ return atomic[idx] != idx;
+ }
private:
TypeAtomic fArrayOfAtoms;
diff --git a/src/kernel/NeKit/InitializerList.h b/src/kernel/NeKit/InitializerList.h
index 46639d4d..e21bd6bd 100644
--- a/src/kernel/NeKit/InitializerList.h
+++ b/src/kernel/NeKit/InitializerList.h
@@ -11,12 +11,12 @@
#include <NeKit/ErrorOr.h>
namespace Kernel {
- // \brief Initalizer List object for containers.
+// \brief Initalizer List object for containers.
template <class Type, SizeT N>
class InitializerList final {
public:
InitializerList() = delete;
-
+
explicit InitializerList(const Type* list) {
if constexpr (N > 0) {
for (auto i = 0UL; i < N; ++i) {
@@ -30,9 +30,9 @@ class InitializerList final {
InitializerList& operator=(const InitializerList&) = delete;
InitializerList(const InitializerList&) = delete;
- Type* begin() { return fList; }
- Type* end() { return fList + N; }
-
+ Type* begin() { return fList; }
+ Type* end() { return fList + N; }
+
constexpr SizeT size() const { return N; }
Type* operator->() { return this->begin(); }
diff --git a/src/kernel/NeKit/Ref.h b/src/kernel/NeKit/Ref.h
index 4767f728..b4d6cb5e 100644
--- a/src/kernel/NeKit/Ref.h
+++ b/src/kernel/NeKit/Ref.h
@@ -11,8 +11,8 @@
#include <CompilerKit/CompilerKit.h>
#include <KernelKit/HeapMgr.h>
#include <NeKit/Config.h>
-#include <NeKit/KernelPanic.h>
#include <NeKit/Domain.h>
+#include <NeKit/KernelPanic.h>
#include <NeKit/Vettable.h>
namespace Kernel {