From 8cafb555dc9c31c5c4a53779bb25d9b3944114ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 2 Dec 2013 15:17:27 +0100 Subject: [PATCH] MeshTools: code cleanup. No need to repeat size computation, this way it's also safer (we won't read memory after the end). --- src/MeshTools/Interleave.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MeshTools/Interleave.h b/src/MeshTools/Interleave.h index e5dae48cc..dc663456a 100644 --- a/src/MeshTools/Interleave.h +++ b/src/MeshTools/Interleave.h @@ -66,7 +66,7 @@ class Interleave { std::tie(std::ignore, std::ignore, data) = operator()(attributes...); mesh.setVertexCount(_attributeCount); - buffer.setData({data, _attributeCount*_stride}, usage); + buffer.setData(data, usage); } /* Specialization for only one attribute array */