From a772fb42d5256f51de52d1b1a9bb9199a03fac95 Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 26 Dec 2022 01:02:46 -0500 Subject: [PATCH] qu --- include/blt/std/queues.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/blt/std/queues.h b/include/blt/std/queues.h index 73ff529..4d8150e 100644 --- a/include/blt/std/queues.h +++ b/include/blt/std/queues.h @@ -31,13 +31,10 @@ namespace BLT { public: void insert(const T& t) { - auto newNode = new node(t, nullptr); if (head == nullptr) - head = newNode; - else { - newNode->next = head; - head = newNode; - } + head = new node(t, nullptr); + else + head = new node(t, head); } [[nodiscard]] const T& front() const {