mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-05-14 07:11:19 +00:00
Fix vectors' operator=
Former-commit-id: 447782bddfcdafc74c5c0b700c95d94d913ea88d
This commit is contained in:
parent
94eb8324a8
commit
8346d160f6
@ -29,7 +29,7 @@ public:
|
|||||||
reserved_vector& operator=(const reserved_vector& other) {
|
reserved_vector& operator=(const reserved_vector& other) {
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
clear();
|
clear();
|
||||||
uninitialized_copy(data(), other.data() + other.size(), other.data());
|
uninitialized_copy(other.data(), other.data() + other.size(), data());
|
||||||
x0_count = other.x0_count;
|
x0_count = other.x0_count;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
|
@ -85,7 +85,7 @@ public:
|
|||||||
xc_items = nullptr;
|
xc_items = nullptr;
|
||||||
} else {
|
} else {
|
||||||
reserve(other.size());
|
reserve(other.size());
|
||||||
uninitialized_copy(data(), other.data(), other.data() + other.size());
|
uninitialized_copy(other.data(), other.data() + other.size(), data());
|
||||||
x4_count = other.x4_count;
|
x4_count = other.x4_count;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user