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; }