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 e9fcd40099
commit 4227192193
2 changed files with 2 additions and 2 deletions

View file

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

View file

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