From ad12b4614276f5eff596bbfb3338caa0de728409 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 1 May 2022 10:21:14 +0300 Subject: Autocommit at 01.05.2022 @ 10:21 --- src/List/List.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/List/List.cpp') diff --git a/src/List/List.cpp b/src/List/List.cpp index fbd3288..bdb9b4a 100644 --- a/src/List/List.cpp +++ b/src/List/List.cpp @@ -29,8 +29,9 @@ void List::copyFrom(const List& other) { /* Public */ template -List::List(const T* elements, unsigned elementsCount) { - +List::List(const T* elements, unsigned elementsCount) : List() { + for (unsigned i = 0; i < elementsCount; i++) + add(elements[i]); } template -- cgit v1.3.1-23-gd82d