Deleting redundant submodules

This commit is contained in:
Dynamitos
2023-12-11 13:04:58 +01:00
parent a49bab9028
commit eceb0f6bcc
16 changed files with 14 additions and 59 deletions
+8 -1
View File
@@ -495,7 +495,14 @@ public:
if(new_cap > allocated)
{
T* temp = allocateArray(new_cap);
std::uninitialized_move_n(begin(), arraySize, temp);
if constexpr (std::is_trivially_copyable_v<T>)
{
std::memcpy(temp, _data, sizeof(T) * arraySize);
}
else
{
std::uninitialized_move_n(begin(), arraySize, temp);
}
_data = temp;
}
allocated = new_cap;