From 6f3297b8c53983326040b0754b5bfba5459ac4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 9 Apr 2023 18:46:43 +0200 Subject: [PATCH] MeshTools: this NoInit shouldn't have been commented out. It dates back to 145e055b41b525218a714eb9e875c3741461d2b8 when the code was written back in 2020. Probably just some debugging leftover, as the array gets fully overwritten later. The only vaguely related case where zero-initialization and/or garbage memory would matter is e4962412907eb16d1440e433a6865be8f559edaa, but that one isn't the case for fuzzy comparison -- here each attribute gets handled separately and any padding is skipped. --- src/Magnum/MeshTools/RemoveDuplicates.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magnum/MeshTools/RemoveDuplicates.cpp b/src/Magnum/MeshTools/RemoveDuplicates.cpp index 28c85fdfd..f36a47840 100644 --- a/src/Magnum/MeshTools/RemoveDuplicates.cpp +++ b/src/Magnum/MeshTools/RemoveDuplicates.cpp @@ -489,8 +489,8 @@ Trade::MeshData removeDuplicatesFuzzy(const Trade::MeshData& data, const Float f Containers::StridedArrayView2D combinedIndices; /* If the mesh is not indexed, allocate for vertex count and keep it - unitialized */ - combinedIndexStorage = Containers::Array{/*Containers::NoInit,*/ + uninitialized */ + combinedIndexStorage = Containers::Array{NoInit, owned.vertexCount()*owned.attributeCount()}; combinedIndices = Containers::StridedArrayView2D{ combinedIndexStorage,