From 8e132b1ee2756f2dd05b82b12bc635a0b4be6cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 29 Jun 2023 13:17:44 +0200 Subject: [PATCH] MeshTools: fix a unused variable warning on a no-assert build. --- src/Magnum/MeshTools/Combine.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Magnum/MeshTools/Combine.cpp b/src/Magnum/MeshTools/Combine.cpp index d4d8d585d..280748083 100644 --- a/src/Magnum/MeshTools/Combine.cpp +++ b/src/Magnum/MeshTools/Combine.cpp @@ -63,7 +63,9 @@ Trade::MeshData combineIndexedImplementation( for(std::size_t i = 0; i != meshes.size(); ++i) { const Trade::MeshData& mesh = meshes[i]; for(std::size_t j = 0; j != mesh.attributeCount(); ++j) { + #ifndef CORRADE_NO_ASSERT const VertexFormat format = mesh.attributeFormat(j); + #endif /* While interleavedLayout() has the same assert, we'd have no way to detect if we should bail early if it triggers, so this is easier; plus the user gets a less confusing function