BAN: Remove unnecessary default constructor from Array

This commit is contained in:
Bananymous 2024-03-06 16:01:52 +02:00
parent 6234a5bc0b
commit efed67cbd0
1 changed files with 2 additions and 9 deletions

View File

@ -18,7 +18,7 @@ namespace BAN
using const_iterator = ConstIteratorSimple<T, Array>; using const_iterator = ConstIteratorSimple<T, Array>;
public: public:
Array(); Array() = default;
Array(const T&); Array(const T&);
iterator begin() { return iterator(m_data); } iterator begin() { return iterator(m_data); }
@ -43,16 +43,9 @@ namespace BAN
T* data() { return m_data; } T* data() { return m_data; }
private: private:
T m_data[S]; T m_data[S] {};
}; };
template<typename T, size_t S>
Array<T, S>::Array()
{
for (size_type i = 0; i < S; i++)
m_data[i] = T();
}
template<typename T, size_t S> template<typename T, size_t S>
Array<T, S>::Array(const T& value) Array<T, S>::Array(const T& value)
{ {