From 42271921937b946936bac1f92ca94ae615875be8 Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Thu, 8 Aug 2024 12:20:46 +0200 Subject: [PATCH] common: add missing consts Adding const was necessary to allow calling the functions on constant objects. --- src/common/tvgArray.h | 2 +- src/common/tvgInlist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/tvgArray.h b/src/common/tvgArray.h index 8178bd0e..19c8f697 100644 --- a/src/common/tvgArray.h +++ b/src/common/tvgArray.h @@ -59,7 +59,7 @@ struct Array data[count++] = element; } - void push(Array& rhs) + void push(const Array& rhs) { if (rhs.count == 0) return; grow(rhs.count); diff --git a/src/common/tvgInlist.h b/src/common/tvgInlist.h index ff28cfd4..fc99ae3d 100644 --- a/src/common/tvgInlist.h +++ b/src/common/tvgInlist.h @@ -100,7 +100,7 @@ struct Inlist if (element == tail) tail = element->prev; } - bool empty() + bool empty() const { return head ? false : true; }