From c24a762e159c7ef57a5c3eeb16f1bd4402649a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 29 Aug 2021 23:55:04 +0200 Subject: [PATCH] Trade: not sure what's up with this silly temporary. Some places have it, some don't. It's shorter without. --- src/Magnum/Trade/MeshData.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Magnum/Trade/MeshData.h b/src/Magnum/Trade/MeshData.h index 08107dea6..073298fbe 100644 --- a/src/Magnum/Trade/MeshData.h +++ b/src/Magnum/Trade/MeshData.h @@ -2166,8 +2166,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[id], "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<2, const typename std::remove_extent::type>(data); } @@ -2189,8 +2188,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[id], "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<2, typename std::remove_extent::type>(data); } @@ -2212,8 +2210,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<2, const typename std::remove_extent::type>(data); } @@ -2235,8 +2232,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<2, typename std::remove_extent::type>(data); }