diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-05-25 22:37:57 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-05-25 22:37:57 -0300 |
| commit | ad8213f35523cbb07f418ae275af448a47cc0288 (patch) | |
| tree | 4d77b8ff2b44461734b5a2cbaad5402b4a94736f /src/containers.hh | |
| parent | 5f883a80175a4cc9abda9d647a6a0d73bda84878 (diff) | |
| download | game-ad8213f35523cbb07f418ae275af448a47cc0288.tar.gz game-ad8213f35523cbb07f418ae275af448a47cc0288.zip | |
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.
Diffstat (limited to 'src/containers.hh')
| -rw-r--r-- | src/containers.hh | 8 |
1 files changed, 4 insertions, 4 deletions
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<uint32, uint32> ToDoQueue(5000, 1000); // priority_queue<uint32, TAttackWave*> AttackWaveQueue(100, 100); -typedef<typename T> +template<typename T> struct matrix{ // REGULAR FUNCTIONS // ========================================================================= @@ -264,7 +264,7 @@ struct matrix{ T *entry; }; -typedef<typename T> +template<typename T> 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; |
