Brett 2022-12-26 00:55:49 -05:00
parent 28777afe9e
commit db7f826c04
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ namespace BLT {
node<T>* head; node<T>* head;
public: public:
void insert(T t) { void insert(const T& t) {
auto newNode = new node<T>(t, nullptr); auto newNode = new node<T>(t, nullptr);
if (head == nullptr) if (head == nullptr)
head = newNode; head = newNode;
@ -36,7 +36,7 @@ namespace BLT {
} }
} }
[[nodiscard]] T front() const { [[nodiscard]] const T& front() const {
return head->t; return head->t;
} }