Fix vectors' operator=

This commit is contained in:
Henrique Gemignani Passos Lima 2022-10-06 02:39:15 +03:00
parent 44e4110ffb
commit 447782bddf
No known key found for this signature in database
GPG Key ID: E224F951761145F8
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ public:
reserved_vector& operator=(const reserved_vector& other) {
if (this != &other) {
clear();
uninitialized_copy(data(), other.data() + other.size(), other.data());
uninitialized_copy(other.data(), other.data() + other.size(), data());
x0_count = other.x0_count;
}
return *this;

View File

@ -85,7 +85,7 @@ public:
xc_items = nullptr;
} else {
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;
}
return *this;