this not crash

This commit is contained in:
Robin Müller 2022-11-10 16:15:28 +01:00
parent 6ca1a5c796
commit 2a203ae13d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -20,11 +20,11 @@ class FixedArrayList : public ArrayList<T, count_t> {
FixedArrayList() : ArrayList<T, count_t>(data, MAX_SIZE) {} FixedArrayList() : ArrayList<T, count_t>(data, MAX_SIZE) {}
FixedArrayList(const FixedArrayList& other) : ArrayList<T, count_t>(data, MAX_SIZE) { FixedArrayList(const FixedArrayList& other) : ArrayList<T, count_t>(data, MAX_SIZE) {
for (size_t idx = 0; idx < sizeof(data); idx++) {
data[idx] = other.data[idx];
}
this->entries = data; this->entries = data;
this->size = other.size; this->size = other.size;
for (size_t idx = 0; idx < this->size; idx++) {
data[idx] = other.data[idx];
}
} }
FixedArrayList& operator=(FixedArrayList other) { FixedArrayList& operator=(FixedArrayList other) {