From be0bce8deda6f8c75d2b63e1efac13baeaf3ac07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 27 Jul 2019 10:53:15 +0200 Subject: [PATCH] Audio: ffs, MSVC. --- src/Magnum/Audio/Test/ContextALTest.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Audio/Test/ContextALTest.cpp b/src/Magnum/Audio/Test/ContextALTest.cpp index 0ac3b282b..e6072d9dd 100644 --- a/src/Magnum/Audio/Test/ContextALTest.cpp +++ b/src/Magnum/Audio/Test/ContextALTest.cpp @@ -95,14 +95,16 @@ void ContextALTest::quietLog() { std::ostringstream out; Debug redirectOutput{&out}; - Context context{Containers::arraySize(argv), argv}; + /* MSVC 2015 and 2017 needs the int cast otherwise C2398 */ + Context context{int(Containers::arraySize(argv)), argv}; CORRADE_COMPARE(out.str().empty(), bool(testCaseInstanceId())); } void ContextALTest::ignoreUnrelatedOptions() { const char* argv[] = { "", "--magnum-gpu-validation", "on" }; - Context context{Containers::arraySize(argv), argv}; + /* MSVC 2015 and 2017 needs the int cast otherwise C2398 */ + Context context{int(Containers::arraySize(argv)), argv}; CORRADE_VERIFY(Context::hasCurrent()); } @@ -143,7 +145,8 @@ void ContextALTest::isExtensionUnsupported() { void ContextALTest::isExtensionDisabled() { /* Yes, FFS. this is a weird-ass name */ const char* argv[] = { "", "--magnum-disable-extensions", "ALC_ENUMERATION_EXT" }; - Context context{Containers::arraySize(argv), argv}; + /* MSVC 2015 and 2017 needs the int cast otherwise C2398 */ + Context context{int(Containers::arraySize(argv)), argv}; CORRADE_VERIFY(!context.isExtensionSupported()); CORRADE_VERIFY(context.isExtensionDisabled());