diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-28 04:14:54 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-28 04:14:54 +0100 |
| commit | e2e01ed3c503cb8d93446abea162ccf9abd56201 (patch) | |
| tree | 536df79e6d6200dd261abd78945aa03ee7439e55 /src/kernel | |
| parent | 9937bcb03d4b3c3e71c33786349d4a41203550c0 (diff) | |
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel')
| -rw-r--r-- | src/kernel/NeKit/Atom.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/kernel/NeKit/Atom.h b/src/kernel/NeKit/Atom.h index c23508f6..53ab661e 100644 --- a/src/kernel/NeKit/Atom.h +++ b/src/kernel/NeKit/Atom.h @@ -10,7 +10,7 @@ namespace Kernel { -template <class TypeAtomic> +template <class AtomicType> class Atom final { public: explicit Atom() = default; @@ -21,29 +21,29 @@ class Atom final { Atom(const Atom&) = delete; public: - using Type = TypeAtomic; - using Ref = TypeAtomic&; - using ConstRef = const TypeAtomic&; + using Type = AtomicType; + using Ref = AtomicType&; + using ConstRef = const AtomicType&; - const TypeAtomic& operator[](const TypeAtomic& bit) { - return (fArrayOfAtoms & (TypeAtomic{} << bit)); + const AtomicType& operator[](const AtomicType& bit) { + return (fArrayOfAtoms & (AtomicType{} << bit)); } - void operator|(const TypeAtomic& bit) { fArrayOfAtoms |= (TypeAtomic{1} << bit); } + void operator|(const AtomicType& bit) { fArrayOfAtoms |= (AtomicType{1} << bit); } - Atom& operator|=(const TypeAtomic& bit) { + Atom& operator|=(const AtomicType& bit) { this->operator|(bit); return *this; } - friend bool operator==(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { + friend bool operator==(Atom<AtomicType>& atomic, const AtomicType& idx) { return atomic[idx] == idx; } - friend bool operator!=(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { + friend bool operator!=(Atom<AtomicType>& atomic, const AtomicType& idx) { return atomic[idx] != idx; } private: - TypeAtomic fArrayOfAtoms; + AtomicType fArrayOfAtoms; }; } // namespace Kernel |
