From efed67cbd052bf81cc592e4df8587559ed56e95c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 6 Mar 2024 16:01:52 +0200 Subject: [PATCH] BAN: Remove unnecessary default constructor from Array --- BAN/include/BAN/Array.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/BAN/include/BAN/Array.h b/BAN/include/BAN/Array.h index b75fee203a..514b282b2e 100644 --- a/BAN/include/BAN/Array.h +++ b/BAN/include/BAN/Array.h @@ -18,7 +18,7 @@ namespace BAN using const_iterator = ConstIteratorSimple; public: - Array(); + Array() = default; Array(const T&); iterator begin() { return iterator(m_data); } @@ -43,16 +43,9 @@ namespace BAN T* data() { return m_data; } private: - T m_data[S]; + T m_data[S] {}; }; - template - Array::Array() - { - for (size_type i = 0; i < S; i++) - m_data[i] = T(); - } - template Array::Array(const T& value) {