From 5f73abc94a3d518e78225cff7b2ec2dc7838fff7 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 30 May 2022 20:03:15 +0300 Subject: Autocommit at 30.05.2022 @ 20:03 --- src/Generic/List/List.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Generic') diff --git a/src/Generic/List/List.hpp b/src/Generic/List/List.hpp index f1919b3..c6fd8a1 100644 --- a/src/Generic/List/List.hpp +++ b/src/Generic/List/List.hpp @@ -116,8 +116,7 @@ List::List(const T* elements, unsigned elementsCount) { template List::List(unsigned length) { - this->length = length; - count = 0; + this->length = count = length; this->elements = new T[length]; for (unsigned i = 0; i < count; i++) this->elements[i] = elements[i]; -- cgit v1.3.1-26-gb76a