1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Avoid copy when adding heightfield to vector

This commit is contained in:
elsid 2021-11-05 17:36:53 +01:00
parent 5f5163905a
commit 671e1e5424
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -242,7 +242,7 @@ namespace DetourNavigator
heightfield.mShift = shift + osg::Vec3f(minX, minY, 0) * stepSize - osg::Vec3f(halfCellSize, halfCellSize, 0);
heightfield.mScale = stepSize;
heightfield.mHeights = std::move(tileHeights);
mHeightfields.emplace_back(heightfield);
mHeightfields.push_back(std::move(heightfield));
}
std::shared_ptr<RecastMesh> RecastMeshBuilder::create(std::size_t generation, std::size_t revision) &&