From 941f0526eb3e46a5d6b6b3a544c0f046752f4f11 Mon Sep 17 00:00:00 2001 From: Tobias Jaster Date: Sun, 2 Jun 2024 23:10:00 +0200 Subject: [PATCH] Fix delete void pointer --- include/ll.h | 6 +++--- library.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ll.h b/include/ll.h index 348c369..7add4ed 100644 --- a/include/ll.h +++ b/include/ll.h @@ -373,7 +373,7 @@ retT *LL::remove(uint32_t loc) { _head = current->next; if(current->remove) { - delete current->data; + delete (retT*)current->data; } delete [] current; if(_head == 0) { @@ -394,7 +394,7 @@ retT *LL::remove(uint32_t loc) current->next->prv = prev; } if(current->remove) { - delete current->data; + delete (retT*)current->data; } delete [] current; } @@ -436,4 +436,4 @@ uint32_t LL::length(void) return count; } -#endif /* LL_H_ */ \ No newline at end of file +#endif /* LL_H_ */ diff --git a/library.json b/library.json index ec930f4..510fc10 100644 --- a/library.json +++ b/library.json @@ -1,6 +1,6 @@ { "name": "LinkedList", - "version": "0.1.0", + "version": "0.1.1", "description": "LinkedList Library", "keywords": "LinkedList", "repository":