summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NeKit/Atom.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-03-12 18:18:06 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-03-12 18:18:06 +0100
commit578e905d123d1ae48ad6690cddd5247b83cdccae (patch)
tree6d332e82cc9c197cb7c5e0aff958b8bdc38009bf /src/kernel/NeKit/Atom.h
parent6498165c295fab8352d8bcb37095ef81190dda20 (diff)
[FEAT] CFAtom & Kernel::Atom improvements, doc TypeAtomic.atom-improvements
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/NeKit/Atom.h')
-rw-r--r--src/kernel/NeKit/Atom.h10
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;
}