From ad8213f35523cbb07f418ae275af448a47cc0288 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Sun, 25 May 2025 22:37:57 -0300 Subject: linux Makefile + fix most compilation problems I wanted to see if the compiler had any problems with the code so far and added a few stub definitions so that each file would properly compile. We still fail when linking but we're able to to find and fix compile time errors. --- src/containers.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/containers.hh') diff --git a/src/containers.hh b/src/containers.hh index 8000d3c..d79946c 100644 --- a/src/containers.hh +++ b/src/containers.hh @@ -75,7 +75,7 @@ struct vector{ increment = this->space; } - T *entry = new[this->space + increment]; + T *entry = new T[this->space + increment]; for(int i = this->min; i <= this->max; i += 1){ int old_index = i - this->start; int new_index = old_index; @@ -207,7 +207,7 @@ struct priority_queue{ // priority_queue ToDoQueue(5000, 1000); // priority_queue AttackWaveQueue(100, 100); -typedef +template struct matrix{ // REGULAR FUNCTIONS // ========================================================================= @@ -264,7 +264,7 @@ struct matrix{ T *entry; }; -typedef +template struct matrix3d{ // REGULAR FUNCTIONS // ========================================================================= @@ -298,7 +298,7 @@ struct matrix3d{ } matrix3d(int xmin, int xmax, int ymin, int ymax, int zmin, int zmax, T init) - : matrix(xmin, xmax, ymin, ymax, zmin, zmax) { + : matrix3d(xmin, xmax, ymin, ymax, zmin, zmax) { int count = this->dx * this->dy * this->dz; for(int i = 0; i < count; i += 1){ this->entry[i] = init; -- cgit v1.2.3