From db7f826c04c5494bfa333516f667f74aafa26b4d Mon Sep 17 00:00:00 2001 From: Brett Date: Mon, 26 Dec 2022 00:55:49 -0500 Subject: [PATCH] Const --- include/blt/std/queues.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/blt/std/queues.h b/include/blt/std/queues.h index 1dcec2d..991c058 100644 --- a/include/blt/std/queues.h +++ b/include/blt/std/queues.h @@ -26,7 +26,7 @@ namespace BLT { node* head; public: - void insert(T t) { + void insert(const T& t) { auto newNode = new node(t, nullptr); if (head == nullptr) head = newNode; @@ -36,7 +36,7 @@ namespace BLT { } } - [[nodiscard]] T front() const { + [[nodiscard]] const T& front() const { return head->t; }