From addcd525526a8c83a3c51ba852ec2514886ab06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Thu, 3 Sep 2020 15:47:43 +0200 Subject: [PATCH] Try to get around MSVC bug --- src/Nazara/OpenGLRenderer/Wrapper/Context.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp index be69bde50..bc6f26c2f 100644 --- a/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp +++ b/src/Nazara/OpenGLRenderer/Wrapper/Context.cpp @@ -29,7 +29,7 @@ namespace Nz::GL struct GLWrapper { template - static auto WrapErrorHandling() + auto WrapErrorHandling() { return [](Args... args) -> Ret { @@ -78,7 +78,10 @@ namespace Nz::GL if (func) { if (std::strcmp(funcName, "glGetError") != 0) //< Prevent infinite recursion - func = GLWrapper>::template WrapErrorHandling(); + { + GLWrapper> wrapper; + func = wrapper.template WrapErrorHandling(); + } } #endif