From fb790b07aeba8e22e4190cf3e1834d11ecde6c96 Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 25 Apr 2025 13:08:33 +0200 Subject: dev: better .clang-format, ran format command. Signed-off-by: Amlal --- dev/kernel/NewKit/Array.h | 73 ++++++++++++++++++----------------------------- 1 file changed, 27 insertions(+), 46 deletions(-) (limited to 'dev/kernel/NewKit/Array.h') diff --git a/dev/kernel/NewKit/Array.h b/dev/kernel/NewKit/Array.h index 1dcc6720..af73d002 100644 --- a/dev/kernel/NewKit/Array.h +++ b/dev/kernel/NewKit/Array.h @@ -1,65 +1,46 @@ /* ------------------------------------------- - Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. + Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved. ------------------------------------------- */ #pragma once #include -#include #include +#include -namespace Kernel -{ - template - class Array final - { - public: - explicit Array() = default; - ~Array() = default; +namespace Kernel { +template +class Array final { + public: + explicit Array() = default; + ~Array() = default; - Array& operator=(const Array&) = default; - Array(const Array&) = default; + Array& operator=(const Array&) = default; + Array(const Array&) = default; - T& operator[](SizeT at) - { - MUST_PASS(at < this->Count()); - return fArray[at]; - } + T& operator[](SizeT at) { + MUST_PASS(at < this->Count()); + return fArray[at]; + } - Boolean Empty() - { - return this->Count() > 0; - } + Boolean Empty() { return this->Count() > 0; } - SizeT Capacity() - { - return N; - } + SizeT Capacity() { return N; } - SizeT Count() - { - return N; - } + SizeT Count() { return N; } - const T* CData() - { - return fArray; - } + const T* CData() { return fArray; } - operator bool() - { - return !Empty(); - } + operator bool() { return !Empty(); } - private: - T fArray[N]; - }; + private: + T fArray[N]; +}; - template - auto make_list(ValueType val) - { - return Array{val}; - } -} // namespace Kernel +template +auto make_list(ValueType val) { + return Array{val}; +} +} // namespace Kernel -- cgit v1.2.3