From 372c1f65317540611ce22a38fe759b46e4d45049 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 1 May 2022 09:56:05 +0300 Subject: Autocommit at 01.05.2022 @ 09:56 --- src/List/List.cpp | 10 ++++++++++ src/List/List.h | 3 +++ 2 files changed, 13 insertions(+) (limited to 'src/List') diff --git a/src/List/List.cpp b/src/List/List.cpp index 66d66df..1ad0679 100644 --- a/src/List/List.cpp +++ b/src/List/List.cpp @@ -50,6 +50,16 @@ T& List::operator[](unsigned index) { return elements[index]; } +template +unsigned List::get_length() const { + return length; +} + +template +unsigned List::get_count() const { + return count; +} + // Rule of 4 template diff --git a/src/List/List.h b/src/List/List.h index 0f256e5..f5d56f3 100644 --- a/src/List/List.h +++ b/src/List/List.h @@ -16,6 +16,9 @@ public: bool removeAt(unsigned index); T& operator[](unsigned index); + unsigned get_length() const; + unsigned get_count() const; + List(); List& operator=(const List& other); List(const List& other); -- cgit v1.3.1-26-gb76a