You've already forked godot
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user