summaryrefslogtreecommitdiffhomepage
path: root/public/frameworks/CoreFoundation.fwrk/headers/Atom.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-03-12 18:22:35 +0100
committerGitHub <noreply@github.com>2026-03-12 18:22:35 +0100
commit9f79840a489aa65a69350fd48bf83d118f56ccb3 (patch)
tree6d332e82cc9c197cb7c5e0aff958b8bdc38009bf /public/frameworks/CoreFoundation.fwrk/headers/Atom.h
parent6498165c295fab8352d8bcb37095ef81190dda20 (diff)
parent578e905d123d1ae48ad6690cddd5247b83cdccae (diff)
Merge pull request #138 from ne-foss-org/atom-improvementsHEADdevelop
[FEAT] CFAtom & Kernel::Atom improvements, doc TypeAtomic.
Diffstat (limited to 'public/frameworks/CoreFoundation.fwrk/headers/Atom.h')
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Atom.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Atom.h b/public/frameworks/CoreFoundation.fwrk/headers/Atom.h
index c58d0600..5abf9824 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Atom.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Atom.h
@@ -20,9 +20,8 @@ class CFAtom final {
CFAtom(const CFAtom&) = delete;
public:
- T operator[](SizeT bit) { return (fArrayOfAtoms & (1 << bit)); }
-
- void operator|(SizeT bit) { fArrayOfAtoms |= (1 << bit); }
+ const T& operator[](const T& bit) { return (fArrayOfAtoms & (T{1} << bit)); }
+ void operator|(const T& bit) { fArrayOfAtoms |= (T{1} << bit); }
friend Boolean operator==(CFAtom<T>& atomic, const T& idx) { return atomic[idx] == idx; }