Website Summary Files Commits Branches @commit @diff @stats
path: root / src / List / List.cpp
diff options
context:
space:
mode:
1 files changed, 3 insertions, 2 deletions
-rw-r--r--src/List/List.cpp5
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<T>::copyFrom(const List& other) {
/* Public */
template <class T>
-List<T>::List(const T* elements, unsigned elementsCount) {
-
+List<T>::List(const T* elements, unsigned elementsCount) : List() {
+ for (unsigned i = 0; i < elementsCount; i++)
+ add(elements[i]);
}
template <class T>