From 182c8f8357739f905bbd721006480502435b6b43 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 27 Nov 2022 12:04:31 -0800 Subject: Update brace style to match rest of my projects --- app/source/Cplt/ImGuiBackend/Backend_OpenGL2.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'app/source/Cplt/ImGuiBackend/Backend_OpenGL2.cpp') diff --git a/app/source/Cplt/ImGuiBackend/Backend_OpenGL2.cpp b/app/source/Cplt/ImGuiBackend/Backend_OpenGL2.cpp index 943a527..e9d05a5 100644 --- a/app/source/Cplt/ImGuiBackend/Backend_OpenGL2.cpp +++ b/app/source/Cplt/ImGuiBackend/Backend_OpenGL2.cpp @@ -13,14 +13,12 @@ # define IMGUI_IMPL_OPENGL_LOADER_CUSTOM # include -class OpenGL2Backend : public RenderingBackend -{ +class OpenGL2Backend : public RenderingBackend { private: GLFWwindow* mWindow; public: - OpenGL2Backend() - { + OpenGL2Backend() { glfwSetErrorCallback(&GlfwErrorCallback); if (!glfwInit()) { throw std::runtime_error("Failed to initialize GLFW."); @@ -44,8 +42,7 @@ public: ImGui_ImplOpenGL2_Init(); } - virtual ~OpenGL2Backend() - { + virtual ~OpenGL2Backend() { ImGui_ImplOpenGL2_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); @@ -54,8 +51,7 @@ public: glfwTerminate(); } - virtual void RunUntilWindowClose(void (*windowContent)()) - { + virtual void RunUntilWindowClose(void (*windowContent)()) { while (!glfwWindowShouldClose(mWindow)) { glfwPollEvents(); @@ -81,14 +77,12 @@ public: } } - static void GlfwErrorCallback(int errorCode, const char* message) - { + static void GlfwErrorCallback(int errorCode, const char* message) { std::cerr << "GLFW Error " << errorCode << ": " << message << "\n"; } }; -std::unique_ptr RenderingBackend::CreateOpenGL2Backend() -{ +std::unique_ptr RenderingBackend::CreateOpenGL2Backend() { try { return std::make_unique(); } catch (std::exception& e) { @@ -98,8 +92,7 @@ std::unique_ptr RenderingBackend::CreateOpenGL2Backend() #else // ^^ BUILD_CORE_WITH_OPENGL2_BACKEND | !BUILD_CORE_WITH_OPENGL2_BACKEND vv -std::unique_ptr RenderingBackend::CreateOpenGL2Backend() -{ +std::unique_ptr RenderingBackend::CreateOpenGL2Backend() { return nullptr; } -- cgit v1.2.3-70-g09d2