From fd96738eca7dc262616e73bb00d4abed7b975497 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 7 May 2022 11:07:45 +0300 Subject: Autocommit at 07.05.2022 @ 11:07 --- src/Generic/List/List.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Generic/List/List.hpp') diff --git a/src/Generic/List/List.hpp b/src/Generic/List/List.hpp index 7088f2e..c798590 100644 --- a/src/Generic/List/List.hpp +++ b/src/Generic/List/List.hpp @@ -17,8 +17,8 @@ protected: public: List(const T* elements, unsigned elementsCount); - void add(const T& element); - void insertAt(const T& element, unsigned index); + void add(T element); + void insertAt(T element, unsigned index); bool removeAt(unsigned index); unsigned findIndex(const T& element) const; bool contain(const T& element) const; @@ -78,14 +78,14 @@ List::List(const T* elements, unsigned elementsCount) { } template -void List::add(const T& element) { +void List::add(T element) { if (length == count) resize(); elements[count++] = element; } template -void List::insertAt(const T& element, unsigned index) { +void List::insertAt(T element, unsigned index) { if (index >= count) add(element); if (length == count) resize(); -- cgit v1.3.1-26-gb76a