From f95d8bf159d10b5a9521dcaa0bc37aa0e9dfc02b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 5 May 2024 21:10:18 +0200 Subject: MHR-23: Add run_format.sh, kernel patches. Signed-off-by: Amlal El Mahrouss --- Private/NewKit/ArrayList.hpp | 89 ++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 44 deletions(-) (limited to 'Private/NewKit/ArrayList.hpp') diff --git a/Private/NewKit/ArrayList.hpp b/Private/NewKit/ArrayList.hpp index b7ab50cf..31646472 100644 --- a/Private/NewKit/ArrayList.hpp +++ b/Private/NewKit/ArrayList.hpp @@ -10,48 +10,49 @@ namespace NewOS { - template - class ArrayList final - { - public: - explicit ArrayList(T *list) - : fList(reinterpret_cast(list)) - {} - - ~ArrayList() = default; - - ArrayList &operator=(const ArrayList &) = default; - ArrayList(const ArrayList &) = default; - - T *Data() - { - return fList; - } - - const T *CData() - { - return fList; - } - - T &operator[](int index) const - { - return fList[index]; - } - - operator bool() - { - return fList; - } - - private: - T *fList; - - friend class InitHelpers; - - }; - - template ArrayList make_list(ValueType val) - { - return ArrayList{val}; - } + template + class ArrayList final + { + public: + explicit ArrayList(T* list) + : fList(reinterpret_cast(list)) + { + } + + ~ArrayList() = default; + + ArrayList& operator=(const ArrayList&) = default; + ArrayList(const ArrayList&) = default; + + T* Data() + { + return fList; + } + + const T* CData() + { + return fList; + } + + T& operator[](int index) const + { + return fList[index]; + } + + operator bool() + { + return fList; + } + + private: + T* fList; + + friend class InitHelpers; + }; + + template + ArrayList make_list(ValueType val) + { + return ArrayList{val}; + } } // namespace NewOS -- cgit v1.2.3