diff --git a/editor/editorTerrainStreamer.cpp b/editor/editorTerrainStreamer.cpp index a12df4b89..21bc2f4e6 100644 --- a/editor/editorTerrainStreamer.cpp +++ b/editor/editorTerrainStreamer.cpp @@ -2443,7 +2443,7 @@ void terrain_streamer::clear_water(bool const Touch) m_watershapes.clear(); } -gfx::geometry_handle terrain_streamer::water_geometry(gfx::vertex_array const &Vertices) +gfx::geometry_handle terrain_streamer::water_geometry(gfx::vertex_array Vertices) { // the geometry of water made before is filled anew, so editing the water doesn't pile up geometry gfx::userdata_array nouserdata; @@ -2507,7 +2507,7 @@ void terrain_streamer::build_water() reach = std::max(reach, glm::length(point - centroid)); } water_shape entry; - entry.geometry = water_geometry(vertices); + entry.geometry = water_geometry(std::move(vertices)); if (entry.geometry.chunk == 0) continue; // two bounding vertices give the shape its area, the triangles are in the geometry @@ -2616,7 +2616,7 @@ void terrain_streamer::build_water() vertices.push_back(vertex); } water_shape entry; - entry.geometry = water_geometry(vertices); + entry.geometry = water_geometry(std::move(vertices)); if (entry.geometry.chunk == 0) continue; auto const reach{glm::length(high - low) * 0.5}; diff --git a/editor/editorTerrainStreamer.hpp b/editor/editorTerrainStreamer.hpp index 8f99fe91f..bde2f8c10 100644 --- a/editor/editorTerrainStreamer.hpp +++ b/editor/editorTerrainStreamer.hpp @@ -306,7 +306,7 @@ class terrain_streamer void build_water(); // the vertices of a shape of the water or of a field in the geometry of the water: one made before filled anew, or a new one; // a handle of chunk 0 if it failed - gfx::geometry_handle water_geometry(gfx::vertex_array const &Vertices); + gfx::geometry_handle water_geometry(gfx::vertex_array Vertices); void clear_water(bool const Touch); std::string pack_path(heightmap::pack_key const &Key) const; // the state of a chunk (null: no chunk) or of the description is kept for the change in progress, if it's the first time