diff options
Diffstat (limited to 'public/frameworks')
| -rw-r--r-- | public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h | 14 | ||||
| -rw-r--r-- | public/frameworks/KernelTest.fwrk/headers/TestCase.h | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h index b178d96b..4811e335 100644 --- a/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h +++ b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h @@ -1,4 +1,4 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) // Licensed under the Apache License, Version 2.0 (see LICENSE file) // Official repository: https://github.com/nekernel-org/nekernel @@ -8,6 +8,8 @@ #include <libSystem/SystemKit/System.h> namespace CF { + +/// @brief The following class makes a dictionary of values, based on their keys. template <class Key, class Value> class CFDictionary final { public: @@ -21,10 +23,8 @@ class CFDictionary final { Bool Empty() { return this->fCount > 0; } - Bool Find(Key& key) { - NE_UNUSED(key); - return false; - } + Bool Find(Key& key); + Bool Find(const Key& key); operator bool() { return !this->Empty(); } @@ -36,6 +36,10 @@ template <typename KeyType, typename ValueType> inline auto make_dict() { return CFDictionary<KeyType, ValueType>{}; } + +template <typename K, V> +using CFDict = CFDictionary<K, V>; + } // namespace CF #endif diff --git a/public/frameworks/KernelTest.fwrk/headers/TestCase.h b/public/frameworks/KernelTest.fwrk/headers/TestCase.h index 7357c045..4f835ff6 100644 --- a/public/frameworks/KernelTest.fwrk/headers/TestCase.h +++ b/public/frameworks/KernelTest.fwrk/headers/TestCase.h @@ -39,7 +39,9 @@ KT_MUST_PASS(ret, ret, true); \ } \ } \ - inline const Char* KTTestCase##NAME::ToString() { return #FN; } + inline const Char* KTTestCase##NAME::ToString() { \ + return #FN; \ + } KT_DECL_TEST(AlwaysBreak, []() -> bool { KT_MUST_PASS("AlwaysBreak", YES, NO); |
