Browse Source

MeshTools: remove a confusing std::move() in removeDuplicatesFuzzy().

Add a TODO instead, as the move *might* make sense with a MeshData&&
overload to reduce peak memory use.
pull/168/head
Vladimír Vondruš 3 years ago
parent
commit
258f700b2d
  1. 10
      src/Magnum/MeshTools/RemoveDuplicates.cpp

10
src/Magnum/MeshTools/RemoveDuplicates.cpp

@ -471,10 +471,12 @@ Trade::MeshData removeDuplicatesFuzzy(const Trade::MeshData& mesh, const Float f
"MeshTools::removeDuplicatesFuzzy(): can't remove duplicates in an attributeless mesh", "MeshTools::removeDuplicatesFuzzy(): can't remove duplicates in an attributeless mesh",
(Trade::MeshData{MeshPrimitive::Points, 0})); (Trade::MeshData{MeshPrimitive::Points, 0}));
/* Turn the passed data into an owned mutable instance we can operate on. /* Turn the passed data into an owned mutable instance we can operate on */
There's a chance the original data are already like this, in which case /** @todo even though the output is always copied as a result of merging
this will be just a passthrough. */ the index arrays, it might still be useful to provide a MeshData&&
Trade::MeshData owned = copy(std::move(mesh)); overload that doesn't perform this initial copy and operates on the
original in-place to save some memory */
Trade::MeshData owned = copy(mesh);
/* Allocate an interleaved index array for all vertices times all /* Allocate an interleaved index array for all vertices times all
attributes */ attributes */

Loading…
Cancel
Save