From 578e905d123d1ae48ad6690cddd5247b83cdccae Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Thu, 12 Mar 2026 18:18:06 +0100 Subject: [FEAT] CFAtom & Kernel::Atom improvements, doc TypeAtomic. Signed-off-by: Amlal El Mahrouss --- src/kernel/NeKit/Atom.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/kernel/NeKit/Atom.h') 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; } -- cgit v1.2.3