From 4fbf744bb4068f55482e75e2948df0696837298a Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 30 Nov 2024 16:31:11 +0000 Subject: [PATCH] Applied format changes. --- .../Graphics/OpenGL/OpenGLGraphicsSystem.cpp | 48 ++++++++++--------- FastCG/src/Platform/Linux/X11Application.cpp | 5 +- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/FastCG/src/Graphics/OpenGL/OpenGLGraphicsSystem.cpp b/FastCG/src/Graphics/OpenGL/OpenGLGraphicsSystem.cpp index 48b6420..571d62c 100644 --- a/FastCG/src/Graphics/OpenGL/OpenGLGraphicsSystem.cpp +++ b/FastCG/src/Graphics/OpenGL/OpenGLGraphicsSystem.cpp @@ -42,19 +42,21 @@ namespace FASTCG_THROW_EXCEPTION(FastCG::Exception, "GLX: GLX_ARB_create_context extension not supported"); } - const int contextAttribs[] = {GLX_CONTEXT_MAJOR_VERSION_ARB, - 4, - GLX_CONTEXT_MINOR_VERSION_ARB, - 3, - GLX_CONTEXT_PROFILE_MASK_ARB, - GLX_CONTEXT_CORE_PROFILE_BIT_ARB, - GLX_CONTEXT_FLAGS_ARB, - GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB + const int contextAttribs[] = { + GLX_CONTEXT_MAJOR_VERSION_ARB, + 4, + GLX_CONTEXT_MINOR_VERSION_ARB, + 3, + GLX_CONTEXT_PROFILE_MASK_ARB, + GLX_CONTEXT_CORE_PROFILE_BIT_ARB, + GLX_CONTEXT_FLAGS_ARB, + GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB #if _DEBUG - | GLX_CONTEXT_DEBUG_BIT_ARB + | GLX_CONTEXT_DEBUG_BIT_ARB #endif - , - 0}; + , + 0 + }; auto *pOldErrorHandler = XSetErrorHandler(&GLXContextErrorHandler); auto context = glXCreateContextAttribsARB(pDisplay, fbConfig, oldContext, True, contextAttribs); @@ -137,19 +139,21 @@ namespace FASTCG_THROW_EXCEPTION(FastCG::Exception, "WGL: WGL_ARB_create_context extension not supported"); } - const int contextAttribs[] = {WGL_CONTEXT_MAJOR_VERSION_ARB, - 4, - WGL_CONTEXT_MINOR_VERSION_ARB, - 3, - WGL_CONTEXT_PROFILE_MASK_ARB, - WGL_CONTEXT_CORE_PROFILE_BIT_ARB, - WGL_CONTEXT_FLAGS_ARB, - WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB + const int contextAttribs[] = { + WGL_CONTEXT_MAJOR_VERSION_ARB, + 4, + WGL_CONTEXT_MINOR_VERSION_ARB, + 3, + WGL_CONTEXT_PROFILE_MASK_ARB, + WGL_CONTEXT_CORE_PROFILE_BIT_ARB, + WGL_CONTEXT_FLAGS_ARB, + WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB #if _DEBUG - | WGL_CONTEXT_DEBUG_BIT_ARB + | WGL_CONTEXT_DEBUG_BIT_ARB #endif - , - 0}; + , + 0 + }; auto context = wglCreateContextAttribsARB(deviceContext, parentContext, contextAttribs); if (context == nullptr) diff --git a/FastCG/src/Platform/Linux/X11Application.cpp b/FastCG/src/Platform/Linux/X11Application.cpp index 01a5888..2b97724 100644 --- a/FastCG/src/Platform/Linux/X11Application.cpp +++ b/FastCG/src/Platform/Linux/X11Application.cpp @@ -17,7 +17,10 @@ namespace #undef MAP_KEY #endif -#define MAP_KEY(a, b) {(uint64_t)a, FastCG::Key::b} +#define MAP_KEY(a, b) \ + { \ + (uint64_t) a, FastCG::Key::b \ + } std::unordered_map KEY_LUT = {MAP_KEY(XK_BackSpace, BACKSPACE), MAP_KEY(XK_Return, RETURN),