From 2c43e817db7b943bc31553936d671100657c56e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 30 Apr 2020 22:33:25 +0200 Subject: [PATCH] DebugTools: wow MSVC thanks for existing. --- src/Magnum/DebugTools/Test/FrameProfilerGLTest.cpp | 4 +++- src/Magnum/DebugTools/Test/FrameProfilerTest.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Magnum/DebugTools/Test/FrameProfilerGLTest.cpp b/src/Magnum/DebugTools/Test/FrameProfilerGLTest.cpp index 2cf573f74..f069f28a5 100644 --- a/src/Magnum/DebugTools/Test/FrameProfilerGLTest.cpp +++ b/src/Magnum/DebugTools/Test/FrameProfilerGLTest.cpp @@ -115,15 +115,17 @@ void FrameProfilerGLTest::test() { GLFrameProfiler profiler{data.values, 4}; CORRADE_COMPARE(profiler.maxFrameCount(), 4); + /* MSVC 2015 needs the {} */ for(auto value: {GLFrameProfiler::Value::CpuDuration, GLFrameProfiler::Value::GpuDuration, #ifndef MAGNUM_TARGET_GLES GLFrameProfiler::Value::VertexFetchRatio, GLFrameProfiler::Value::PrimitiveClipRatio #endif - }) + }) { if(data.values & value) CORRADE_VERIFY(!profiler.isMeasurementAvailable(value)); + } profiler.beginFrame(); shader.draw(mesh); diff --git a/src/Magnum/DebugTools/Test/FrameProfilerTest.cpp b/src/Magnum/DebugTools/Test/FrameProfilerTest.cpp index 900e5e06c..b542265c5 100644 --- a/src/Magnum/DebugTools/Test/FrameProfilerTest.cpp +++ b/src/Magnum/DebugTools/Test/FrameProfilerTest.cpp @@ -961,10 +961,12 @@ void FrameProfilerTest::gl() { CORRADE_COMPARE(profiler.maxFrameCount(), 4); CORRADE_COMPARE(profiler.measurementCount(), data.measurementCount); + /* MSVC 2015 needs the {} */ for(auto value: {GLFrameProfiler::Value::CpuDuration, - GLFrameProfiler::Value::FrameTime}) + GLFrameProfiler::Value::FrameTime}) { if(data.values & value) CORRADE_VERIFY(!profiler.isMeasurementAvailable(value)); + } profiler.beginFrame(); Utility::System::sleep(1);