From 540e36b2e37de25d86a229c7f0add091d7ccf68d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 28 Nov 2015 18:53:50 +0100 Subject: [PATCH] MeshTools: fix the fix for CORRADE_NO_ASSERT build. --- src/Magnum/MeshTools/Interleave.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magnum/MeshTools/Interleave.h b/src/Magnum/MeshTools/Interleave.h index 758b7c798..67cbbb82c 100644 --- a/src/Magnum/MeshTools/Interleave.h +++ b/src/Magnum/MeshTools/Interleave.h @@ -166,12 +166,12 @@ parameters. contain the interleaved data. */ template void interleaveInto(Containers::ArrayView buffer, const T& first, const U&... next) { - #if !defined(CORRADE_NO_ASSERT) || defined(CORRADE_GRACEFUL_ASSERT) /* Verify expected buffer size */ + #if !defined(CORRADE_NO_ASSERT) || defined(CORRADE_GRACEFUL_ASSERT) const std::size_t attributeCount = Implementation::AttributeCount{}(first, next...); + #endif const std::size_t stride = Implementation::Stride{}(first, next...); CORRADE_ASSERT(attributeCount*stride <= buffer.size(), "MeshTools::interleaveInto(): the data buffer is too small, expected" << attributeCount*stride << "but got" << buffer.size(), ); - #endif /* Write data */ Implementation::writeInterleaved(stride, buffer.begin(), first, next...);