From fb483be51275c84e5b4ff964a49270eed4be52c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 25 Mar 2018 21:16:25 +0200 Subject: [PATCH] MeshTools: suppress MSVC warning when using interleave(). --- src/Magnum/MeshTools/Interleave.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Magnum/MeshTools/Interleave.h b/src/Magnum/MeshTools/Interleave.h index 617f6947e..8cb45598f 100644 --- a/src/Magnum/MeshTools/Interleave.h +++ b/src/Magnum/MeshTools/Interleave.h @@ -49,7 +49,14 @@ struct AttributeCount { next #endif ) const { + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4127) /* conditional expression is constant (of course) */ + #endif CORRADE_ASSERT(sizeof...(next) == 0 || AttributeCount{}(next...) == first.size() || AttributeCount{}(next...) == ~std::size_t(0), "MeshTools::interleave(): attribute arrays don't have the same length, expected" << first.size() << "but got" << AttributeCount{}(next...), 0); + #ifdef _MSC_VER + #pragma warning(pop) + #endif return first.size(); }