1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #104693 from mihe/local-vector-move

Optimize `LocalVector::push_back` for non-trivial objects
This commit is contained in:
Rémi Verschelde
2025-03-28 14:34:49 +01:00

View File

@@ -64,7 +64,7 @@ public:
}
if constexpr (!std::is_trivially_constructible_v<T> && !force_trivial) {
memnew_placement(&data[count++], T(p_elem));
memnew_placement(&data[count++], T(std::move(p_elem)));
} else {
data[count++] = std::move(p_elem);
}