From 56bdec57609cd00d7827a3008a9c6b06707097ca Mon Sep 17 00:00:00 2001 From: fusion32 Date: Tue, 17 Jun 2025 03:13:05 -0300 Subject: all `crplayer.cc` functions outside `TPlayer` --- src/containers.hh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/containers.hh') diff --git a/src/containers.hh b/src/containers.hh index ecbe6be..1ff9896 100644 --- a/src/containers.hh +++ b/src/containers.hh @@ -532,7 +532,9 @@ union storeitem{ // IMPORTANT(fusion): This will only work properly with POD structures. We // could also manually handle `data` construction and destruction but I don't // think we need it. - STATIC_ASSERT(std::is_pod::value); + STATIC_ASSERT(std::is_trivially_default_constructible::value + && std::is_trivially_destructible::value + && std::is_trivially_copyable::value); storeitem *next; T data; }; @@ -560,7 +562,7 @@ struct store{ T *getFreeItem(void){ if(this->firstFreeItem == NULL){ - storeunit *Unit = &this->Units.append()->data; + storeunit *Unit = &this->Units->append()->data; for(usize i = 0; i < (N - 1); i += 1){ Unit->item[i].next = &Unit->item[i + 1]; } @@ -577,7 +579,7 @@ struct store{ // TODO(fusion): Not the safest thing to do. ASSERT(Item != NULL); ((storeitem*)Item)->next = this->firstFreeItem; - this->firstfreeItem = (storeitem*)Item; + this->firstFreeItem = (storeitem*)Item; } // DATA -- cgit v1.2.3