common: add missing consts

Adding const was necessary to allow calling
the functions on constant objects.
This commit is contained in:
Mira Grudzinska 2024-08-08 12:20:46 +02:00 committed by Hermet Park
parent fdc45edf32
commit 6902c790d2
2 changed files with 2 additions and 2 deletions

View file

@ -59,7 +59,7 @@ struct Array
data[count++] = element; data[count++] = element;
} }
void push(Array<T>& rhs) void push(const Array<T>& rhs)
{ {
if (rhs.count == 0) return; if (rhs.count == 0) return;
grow(rhs.count); grow(rhs.count);

View file

@ -100,7 +100,7 @@ struct Inlist
if (element == tail) tail = element->prev; if (element == tail) tail = element->prev;
} }
bool empty() bool empty() const
{ {
return head ? false : true; return head ? false : true;
} }