From 07e89f384155abd4ec231edc173ce0d03244b1cf Mon Sep 17 00:00:00 2001 From: FelixBrendel Date: Fri, 3 Apr 2020 22:46:37 +0200 Subject: [PATCH] array lists now can be cleared --- arraylist.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arraylist.hpp b/arraylist.hpp index 43b83f5..25a99fc 100644 --- a/arraylist.hpp +++ b/arraylist.hpp @@ -19,6 +19,11 @@ struct Array_List { data = 0; } + + void clear() { + next_index = 0; + } + Array_List clone() { Array_List ret; ret.length = length;