diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-12 18:22:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-12 18:22:35 +0100 |
| commit | 9f79840a489aa65a69350fd48bf83d118f56ccb3 (patch) | |
| tree | 6d332e82cc9c197cb7c5e0aff958b8bdc38009bf /src/kernel/NeKit/Atom.h | |
| parent | 6498165c295fab8352d8bcb37095ef81190dda20 (diff) | |
| parent | 578e905d123d1ae48ad6690cddd5247b83cdccae (diff) | |
[FEAT] CFAtom & Kernel::Atom improvements, doc TypeAtomic.
Diffstat (limited to 'src/kernel/NeKit/Atom.h')
| -rw-r--r-- | src/kernel/NeKit/Atom.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kernel/NeKit/Atom.h b/src/kernel/NeKit/Atom.h index 26be562b..c23508f6 100644 --- a/src/kernel/NeKit/Atom.h +++ b/src/kernel/NeKit/Atom.h @@ -3,7 +3,6 @@ // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/ne-foss-org/nekernel - #ifndef NEKIT_ATOM_H #define NEKIT_ATOM_H @@ -26,11 +25,12 @@ class Atom final { using Ref = TypeAtomic&; using ConstRef = const TypeAtomic&; - const TypeAtomic& operator[](const SizeT& bit) { return (fArrayOfAtoms & (1 << bit)); } - - void operator|(const SizeT& bit) { fArrayOfAtoms |= (1 << bit); } + const TypeAtomic& operator[](const TypeAtomic& bit) { + return (fArrayOfAtoms & (TypeAtomic{} << bit)); + } + void operator|(const TypeAtomic& bit) { fArrayOfAtoms |= (TypeAtomic{1} << bit); } - Atom& operator|=(const SizeT& bit) { + Atom& operator|=(const TypeAtomic& bit) { this->operator|(bit); return *this; } |
