-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPackedArray.cpp
More file actions
47 lines (46 loc) · 939 Bytes
/
PackedArray.cpp
File metadata and controls
47 lines (46 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "PackedArray.h"
//template <typename T>
//PackedArray<T>::PackedArray()
//{
// this->size = 4;
// this->arr = new T[this->size];
// this->Count = 0;
//}
//template <typename T>
//T * PackedArray<T>::Get(uint8_t index)
//{
// return &this->arr[index];
//}
//template <typename T>
//
//void PackedArray<T>:: Add(const T& item)
//{
// if (this->Count == this->size)
// {
// this->size *= 2;
// T* resizedArray = new T[this->size];
//
// for (uint8_t i = 0; i < this->Count; i++) {
// resizedArray[i] = arr[i];
// }
//
// delete[] arr; // Deallocate the memory of the original array
//
// arr = resizedArray;
// }
// arr[this->Count] = item;
// this->Count++;
//}
//
//
//template <typename T>
//void PackedArray<T>:: Remove(uint8_t index)
//{
// T lastValue = this->arr[Count - 1];
// this->arr[index] = lastValue;
// this->arr[Count - 1] = T();
// Count--;
//}
//void tempFunc2() {
// PackedArray<uint8_t> notApplical;
//}