From 047fd33817bd76d477381f82e04f3e545a0e7397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 7 Feb 2022 19:11:44 +0100 Subject: [PATCH] sceneconverter: don't sort mesh attributes by the offset. What a stupid idea, cuz now it's impossible to know which attribute has which ID, so using --only-attributes is just a total guesswork, resulting in meshes that have no positions or other nightmare scenarios. NOT a good idea, past mosra. By the way, removing the std::sort() stripped 16 kB off the release binary size (178 kB before, 162 after). Fancy, C++, very fancy. --- src/Magnum/SceneTools/sceneconverter.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Magnum/SceneTools/sceneconverter.cpp b/src/Magnum/SceneTools/sceneconverter.cpp index f4dbbb27f..7bff74842 100644 --- a/src/Magnum/SceneTools/sceneconverter.cpp +++ b/src/Magnum/SceneTools/sceneconverter.cpp @@ -23,7 +23,6 @@ DEALINGS IN THE SOFTWARE. */ -#include #include #include #include @@ -651,11 +650,6 @@ used.)") bounds); } - std::sort(info.attributes.begin(), info.attributes.end(), - [](const MeshAttributeInfo& a, const MeshAttributeInfo& b) { - return a.offset < b.offset; - }); - arrayAppend(meshInfos, std::move(info)); } }